0

I followed the XAMPP documentation on setting up sendmail.exe. I added

sendmail_path = “\”C:\xampp\sendmail\sendmail.exe\” -t”

to the php.ini file and

smtp_server=ssl://smtp.gmail.com
smtp_port=465
smtp_ssl=auto
error_logfile=error.log
auth_username=[myemail]@gmail.com
auth_password=[my password]

to the sendmail.ini file. I then created the following test per the XAMPP documentation

<?php
$to = '[myemail]@gmail.com';
$subject = 'Hello from XAMPP!';
$message = 'This is a test';
$headers = "From: [myemail]@gmail.com\r\n";
if (mail($to, $subject, $message, $headers)) {
   echo "SUCCESS";
} else {
   echo "ERROR";
}
?>

I get the SUCCESS echo, but nothing shows up in my inbox. Am I missing something?

Adam Johnston
  • 1,399
  • 2
  • 12
  • 23

0 Answers0