0

Using PHP sendmail() class. Xampp 3.2.1 on windows local machine. PHP 5.5.15. Using my gmail account to process the emails.

I am able to send to my xxx@telus.net email (my personal email I use regularly), to xxx@gmail.com email, but it does not get through to my xxx@hotmail email.

How do I begin troubleshooting why it does not work for the hotmail email? Are there restrictions to some email accounts for this setup?

Basic email code is below:

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Mailer = 'smtp';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->Host = 'smtp.gmail.com';
$mail->IsHTML(true);
$mail->SMTPAuth = true;
$mail->Username = 'XXXXXXXXXX@gmail.com';
$mail->Password = 'XXXXXX';
//Sender Info
$mail->From = 'Test.com';
$mail->FromName = 'Mr. Somebody';
//prepare email body
$mail_body = '<html>
<h2>User Registration Verification from anyCompany</h2>
<p>Thank you for registering</p>
</body>
</html>';
$mail->addAddress('XXXX@Hotmail.com','Jack');
$mail->Subject = "Message from anyCompany: Registration";
$mail->Body = $mail_body;
$mail->Send();

Thanks in advance!

Red
  • 6,599
  • 9
  • 43
  • 85
HDer
  • 385
  • 5
  • 17

1 Answers1

0

Your Email looks like Spam. Did you Check the Spam folder on your Hotmail Account?

raah
  • 71
  • 2
  • 6
  • Thank you! Yes, it was working fine all the time, just all went into my spam folder, which I normally have turned off, but not this time!!!! – HDer Apr 23 '18 at 16:10