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 protected]
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.