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 = "xxx@xxx.com";
$to = "xxx@xxx.com";
$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 = katosart@gmail.com
sendmail_path="D:\xampp2\sendmail\sendmail.exe\" -t"
Sendmail.ini
smtp_server= smtp.gmail.com
smtp_port= 465
smtp_ssl= auto
auth_username=katosart@gmail.com
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? :)