2

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.

Ibra038
  • 151
  • 1
  • 3
  • 13
  • Post a packet trace of the SMTP connection to Hotmail. – Brad Apr 02 '12 at 15:35
  • Check your spam folder (ongewenste e-mail). It's probably Hotmails spam filter that filters out messages like this. – GolezTrol Apr 02 '12 at 15:35
  • @Brad what do you mean? or how can i see it? at>GolezTrol Nope, spam folder is empty ): – Ibra038 Apr 02 '12 at 15:41
  • @user1303265, Use Wireshark (http://www.wireshark.org/). No doubt you will see a message from Hotmail saying you are flagged for spam. – Brad Apr 02 '12 at 15:57

2 Answers2

2

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.

dAm2K
  • 9,923
  • 5
  • 44
  • 47
  • Hmm.. but my contact script work perfectly!.. Should i call my hosting about this problem? – Ibra038 Apr 02 '12 at 15:54
  • @user1303265 yes, you should call your hosting provider to see what it's happening at SMTP level. Sure, they will tell you that there's no problem with their MTA, and that's correct, the problem is with M$ hotmail's!! – dAm2K Apr 02 '12 at 15:59
1

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?

Pope
  • 131
  • 2