Latox
February 22, 2010, 8:48am
1
I am using PHP mail function to send out confirmation e-mails on one of my
sites.
Some sites such as hotmail.com , live.com , yahoo.com are not receiving the
confirmation e-mails… whereas others are.
What seems to be the problem? How can I fix it?
EDIT:
After reading some more, my server does not have an SPF record… could this be the reason some mail is not getting to certain providers?
I’ve realized this isn’t a PHP issue and my mistake for posting it here, if a moderator could move it to the appropriate section I’d appreciate it.
If you find out why it does not work or a work-around please post here. I have problems with yahoo and other accounts even if i have spf records or send e-mails with pop3 or imap.
Latox
February 22, 2010, 11:31am
3
I have found a fix for it… seems to be working, I didn’t have the right headers set for my PHP mail, so use these:
$headers .= "From: Name <you@what.com>\
";
$headers .= "Reply-To: <you@what.com>\
";
$headers .= "X-Sender: <you@what.com>\
";
$headers .= "X-Mailer: PHP4\
"; //mailer
$headers .= "X-Priority: 3\
"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <you@what.com>\
";
mail(emailto@who.com, subject, message, $headers);