Can't send mails to only Hotmail. (gmail, etc. works perfectly)

微笑、不失礼 提交于 2019-12-12 16:27:58

问题


I need your help. I have a php script to send email to people who register. but that script does not work for hotmail. hotmail users do not receive that email at all. not even in the junk folder. it works perfectly ok for yahoo! Mail. what am i doing wrong. here's the basic mail script:

 $to      = 'info@mydomain.nl, ****@hotmail.com, ***@live.nl';
 $subject = 'the subject';
 $message = 'hello';
 $headers = 'From: webmaster@example.com' . "\r\n" .
     'Reply-To: webmaster@example.com' . "\r\n" .
     'X-Mailer: PHP/' . phpversion();

 mail($to, $subject, $message, $headers);

Result: only info@mydomain.nl recieved the mail.

How can I fix this?

Btw, my contact script works great with hotmail.


回答1:


It's not a PHP problem. Those bad mail providers make use of non standard aggressive anti spam policies that silently drop incoming emails.

You should call your sysadmin and let him check the MTA on your PHP servers. Usualy it's a better solution to use the MTA relay given by your PHP Internet Service Provider instead of using a standalone MTA like sendmail on your PHP server machine.

HTH.




回答2:


Hotmail email deliverability is a tricky issue.

Their servers could be rejecting the emails based on the header information in the email, or maybe its rejecting it due to a failure to authenticate the sender domain against the IP address of the web server its being sent from.

If you haven't already, you could try and improve on email deliverability by posting up a SPF record against the domain you're sending from, and see if that helps. MS have information on Sender ID authentication and how to implement it if that is the issue. http://www.microsoft.com/mscorp/safety/technologies/senderid/overview.mspx

If that's not it maybe its the information contained in the email message header that is causing the problem, can you post an example?



来源:https://stackoverflow.com/questions/9979186/cant-send-mails-to-only-hotmail-gmail-etc-works-perfectly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!