Re: PHP4: extra headers in mail() ?
| From: | (Sean Straw / PSE) | Date: | Tue, 05 Dec 2000 10:17:12 +0000 |
| Subject: | Re: PHP4: extra headers in mail() ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28702@lists.php.net to get a copy of this message | ||
At 01:07 2000-12-05 -0800, Joe Stump wrote:
NOTE: mail() ALWAYS returns true - so doing checks is usually not a good thing with mail(). [snip]Wow, so good of the documentation to bother mentioning this. A read of ext/standard/mail.c would seem to indicate that the documentation isn't lying though, while actual tests demonstrate that all manner of bogus parameters don't get caught (like a blank to:). A Zend-ism? Even so, error handling is an appropriate thing to do, even if it might not currently be catching those errors -- a rewritten form of the function can still return an error (and in fact, if there's a misconfiguration and sendmail doesn't spawn, an error may be returned even right now). As it happens, I found a rewritten version (which spawns sendmail directly), which addresses my original query (AND does return errors on a failure to spawn sendmail) - it was in the php.net manpage for the mail function. Not mentioned there, but which I already know, is that if you want to avoid an "X-Authentication-Warning" (or similar header) being emitted by sendmail, the webuser needs to be listed among the "trusted" users in sendmail -- generally a good idea if you want a nice clean appearance to your sent messages. NOTE: cc: is totally unnecessary on a mailing list unless specifically requested, and in my case, I specifically, and respectfully request that they NOT be sent. --- Please DO NOT carbon me on list replies. I'll get my copy from the list. Sean B. Straw / Professional Software Engineering Post Box 2395 / San Rafael, CA 94912-2395