note 24875 deleted from function.mail by derick
| From: | derick@php.net | Date: | Sat, 15 May 2004 13:23:52 +0000 |
| Subject: | note 24875 deleted from function.mail by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-69642@lists.php.net to get a copy of this message | ||
Note Submitter: crdesignprod@NO_SPAMyahoo.com
----
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.