note 46110 deleted from function.mail by aidan
| From: | aidan@php.net | Date: | Mon, 14 Feb 2005 02:21:35 +0000 |
| Subject: | note 46110 deleted from function.mail by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84966@lists.php.net to get a copy of this message | ||
Note Submitter: prikid at prikid dot com
----
Comming back to the sendmail and "Return-Path:" option
If you're on the shared server, where you cannot access the 'php.ini' file and still
need to get all the bounces back, you'd need to set the fifth parameter in the mail() function:
<?
$headers = "MIME-Version: 1.0\r\n";
$headers .= "From: $name <$email>\r\n";
$headers .= "Reply-to: $name <$email>\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP mailer\r\n";
mail ($to, $subject, $content, $headers, "-fbounce@myhost.com");
?>
The sendmail will override the "Return-Path:" header and you won't be able to get the
messages back, but last, fifth, parameter "-fbounce@myhost.com" will set all the bounces
to bounce@myhost.com
The sendmail will add the following line to the headers sent with the message:
-----------
X-Authentication-Warning: server.com: httpd set sender to bounce@myhost.com using -f
-----------
but I don't see that as a problem