note 24875 added to function.mail
| From: | crdesignprod at NO_SPAMyahoo dot com | Date: | Fri, 30 Aug 2002 19:52:12 +0000 |
| Subject: | note 24875 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36061@lists.php.net to get a copy of this message | ||
This is a problem I ran into that really had me stumped for awhile.
I was using mail() to send messages from a bulletin board I created via a form in order to keep
users email addresses private (read no email mining possible). Problem was some people were not
getting the messages. After testing on MANY different email accounts I was beginning to get stumped.
It seems that some ISP's and servers require that the Return-Path header email address match
the From email address in order for it to be passed onto the users account. By adding
-f email@address.com
as the last parameter in the mail function to the same as the From address everything started
getting recieved as it should. Here's two examples.
mail($to, $subject, $body, $from);
resulted in some people not receiving the message.
but...
mail($to, $subject, $body, $from, "-f $from_email_address");
everyone got the message as intended.
Hope this helps someone else out as it had me totally baffled until I started comparing the full
headers of my email messages.
--
http://www.php.net/manual/en/function.mail.php
http://master.php.net/manage/user-notes.php?action=edit+24875
http://master.php.net/manage/user-notes.php?action=delete+24875
http://master.php.net/manage/user-notes.php?action=reject+24875