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!