I am sending mail using sendmail package in my application the mail sending function is simple :
mail($to,$subject,$mailmessage);
My application is installed on Windows Server 2008 ![enter image description here][1] I have scheduled a task using task scheduler to run the script every 5 minutes
All the script runs but mail is not working the error I get on the cmd display is :
PHP Warning: mail(): Failed to connect to mailserver at "localhost" port 25, ve rify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\ www\RCold\mailingcron.php on line 3 PHP Stack trace: PHP 1. {main}() C:\wamp\www\RCold\mailingcron.php:0 PHP 2. mail() C:\wamp\www\RCold\mailingcron.php:3
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\R Cold\mailingcron.php on line 3
Call Stack: 0.0008 227816 1. {main}() C:\wamp\www\RCold\mailingcron.php:0 0.0008 228800 2. mail() C:\wamp\www\RCold\mailingcron.php:3
If I run the same script on a browser, the mail function works properly.
How can I run the mail function from command line