note 12425 deleted from function.imap-mail by nlopess
| From: | nlopess@php.net | Date: | Sat, 26 Feb 2005 20:14:35 +0000 |
| Subject: | note 12425 deleted from function.imap-mail by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-85601@lists.php.net to get a copy of this message | ||
Note Submitter: jsherri1 at rochester dot rr dot com
----
Note that your mailer program (probably sendmail on unix) will insert a Return-Path header that
lists the identity under which PHP/your webserver is running, probably nobody@localhost.
If you insert a From: header, your message will work, and replies to it will work. However, if the
message is sent to a bad address or there is any other error, the Return-Path header is used. If
you're (and/or others are) sending mail under different identities, this will lump all the
errors messages at nobody@localhost instead of the originating user's mailbox.
The solution is to use the mail() function in PHP 4.0.5 (not out yet at the time of this post) which
will apparently have an extra option to allow you to set that header.
You also can write a custom routine using popen that talks to sendmail directly and adds the -f
switch with the correct Return-Path info. There are currently user-contributed notes that describe
this routine on the mail() page.