Having some issues with Sendmail on Xampp (Windows Installation) - When I try a test Email (See below script)
<?php
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = "[email protected]";
$to = "[email protected]";
$subject = "PHP Mail Test script";
$message = "This is a test to check the PHP Mail functionality";
$headers = "From:" . $from;
mail($to,$subject,$message, $headers);
echo "Test email sent";
?>
Upon running this script and checking the error.log I get the following error:
'D:\Xampp2\sendmail\sendmail.exe" -t' is not recognized as an internal or external command,
operable program or batch file.
My settings look like so:
PHP.ini
XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP = smtp.gmail.com
smtp_port = 465
sendmail_from = [email protected]
sendmail_path="D:\xampp2\sendmail\sendmail.exe\" -t"
Sendmail.ini
smtp_server= smtp.gmail.com
smtp_port= 465
smtp_ssl= auto
[email protected]
auth_password=(HIDDEN)
I have tried using ports of: 587, 465, 25 for the smtp_port area. Rather stumped on this one - any ideas please? :)
OK! So I have worked this out myself by commenting out:
However, I now got an Email from Google saying:
So the emails are getting through. I worry that this may impact on other recipients receiving the same issue?
EDIT: Getting an error on the running of the above script, the error is: