0

I am working with PHP Mailer to send the mails. It working fine in my localhost. And when i tested it from my Linux server, i am receiving mails to all as fine except hotmail . Please find the below code im running.

<?php require_once('PHPMailer/class.phpmailer.php'); 
  $mail = new PHPMailer();
  $mail->IsSMTP();

  $mail->From = "no-repy@gmail.com";    //From Address -- CHANGE --
  $mail->FromName = "myname";    //From Name -- CHANGE --
  $mail->AddAddress('*****@hotmail.com');    //To Address -- CHANGE --
  $mail->AddAddress('*****@gmail.com');
  $mail->AddReplyTo("no-reply@gmail.com", "gmail"); //Reply-To Address -- CHANGE --

  $mail->WordWrap = 50;    // set word wrap to 50 characters
  $mail->IsHTML(false);    // set email format to HTML

  $mail->Subject = "AuthSMTP Test";
  $mail->Body    = "AuthSMTP Test Message!";

  if(!$mail->Send())
  {
    echo "Message could not be sent. <p>";
    echo "Mailer Error: " . $mail->ErrorInfo;
    exit;
  }

  echo "Message has been sent";

?>

After running this im getting the response as

Message has been sent

But receiving mail to my Gmail a/c, not to the Hotmail.

Please help regarding this one.

Thanks in advance.

Prabhukiran
  • 149
  • 1
  • 8
  • Check the spam folder and also this http://stackoverflow.com/questions/9899768/phpmailer-sending-mail-to-spam-in-hotmail-how-to-fix?rq=1 – Matteo Oct 15 '14 at 13:29
  • @Matteo I have checked Junk folder also. Bt not received. On searching all sites came to know that there is a problem in GoDaddy , PHPMailer. Let me know if u have any idea regarding in this. – Prabhukiran Oct 15 '14 at 14:01
  • I'm surprised this is working at all. You have called `isSMTP()`, but have not specified a Host, Port, User or Password. You need to update PHPMailer, and you should set `SMTPDebug = 3` to get more feedback on what's happening when you talk to hotmail. – Synchro Oct 15 '14 at 15:45

1 Answers1

0

I had the same problem; indeed mail arrived at other destinations except hotmail.

It turns out MS*** recently decided to block emails coming from godaddy mailers (secureserver.net). And these emails are not even sent to spam/deleted folders for hotmail recipients, they are just sent to the ether. Believe it or not.

After calls and mails to both parties, where of course you get no useful info or solution, I just decided to bypass their mailers and instead use a 3rd party service: sendgrid.com. Didn't use their smtp solution, as GD seems to blocks external smtp (at least in shared hosting); but the sendgrid-php works just fine.

MaxD
  • 574
  • 3
  • 10