note 46110 added to function.mail

From: Date: Wed, 29 Sep 2004 19:22:24 +0000
Subject: note 46110 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-77580@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46110 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46110&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46110&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77580) next »