Re: any reason why mail() returns a false value?

From: Date: Sat, 22 Jun 2002 08:03:32 +0000
Subject: Re: any reason why mail() returns a false value?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103382@lists.php.net to get a copy of this message
Worked fine for me, what it your sendmail setting. I'm on win2k php 4.2.1 and i send via my isp's smtp server. If I'm offline i get an error Warning: Failed to Connect in c:\my documents\\temp\php\hs~temp.php on line 9 Now, hopefully your message has been sent.The return value of mail() is 0. when online i get Now, hopefully your message has been sent.The return value of mail() is 1. Paul Roberts roberts_paul@bigfoot.com ++++++++++++++++++++++++ ----- Original Message ----- From: "Erik Price" <pricee@hhbrown.com> To: "Lazor, Ed" <ELazor@providence.org> Cc: <php-general@lists.php.net> Sent: Friday, June 21, 2002 6:30 PM Subject: Re: [PHP] any reason why mail() returns a false value? Ed, thanks for taking a look at this: [eprice@media eprice]$ less public_html/testmail.php <html> <head> <title>a mail Test</title> </head> <body> <?php $return = mail('pricee@hhbrown.com', 'subject', 'message'); print "<p>Now, hopefully your message has been sent."; print "The return value of mail() is " . (int)$return . ".</p>\n"; ?> </body> </html> The results I get are: Now, hopefully your message has been sent.The return value of mail() is 0. My path_to_sendmail is confirmed to be correct, and again, I have tested sendmail -- it works fine from the command line. It's executable by all users, so my Apache user shouldn't have a hard time executing it. There's just no explanation! I've even pointed my path_to_sendmail to an executable shell script that prints a confirmation message if it is executed, and the mail() function has the exact same effect if I do this. Gratefully, Erik On Friday, June 21, 2002, at 12:56 PM, Lazor, Ed wrote: > Please send code generating the problem. > >> -----Original Message----- >> my sendmail problem is still present -- every time I try to call the >> "mail()" function, even with the simplest of arguments (the >> first three >> required arguments, all three of them simple string literals: >> mail('pricee@hhbrown.com', 'SubjectString', 'BodyText')), it >> fails. >> >> No email is sent, the return value of the function, when cast to >> integer, is zero, and I have thoroughly tested that sendmail >> works just >> fine. It is a RedHat 7.2 server, if that matters (though I >> don't think >> it does). I have done all of my compiling as root, and >> /usr/sbin/sendmail was definitely in my PATH. > > ************************************************************************* > *** > This message is intended for the sole use of the individual and entity > to > whom it is addressed, and may contain information that is privileged, > confidential and exempt from disclosure under applicable law. If you > are > not the intended addressee, nor authorized to receive for the intended > addressee, you are hereby notified that you may not use, copy, disclose > or > distribute to anyone the message or any information contained in the > message. If you have received this message in error, please immediately > advise the sender by reply email and delete the message. Thank you very > much. > > ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#103382) next »