Simple PHP mailer - Failed to connect to mailserver
Posted: Wed Nov 11, 2009 2:03 am
Hi ppl,
I'm using simple PHP mailer and it fails to connect to mail server.
This is the code:
This is the error I'm getting with I run the code:
What should I change on ini_set() to make the email working? pls help
Thanks
Sokka
I'm using simple PHP mailer and it fails to connect to mail server.
This is the code:
Code: Select all
$toEmail = "ramwy@myemail.com";
$subject = "Your access details for Learning Managment System (LMS)";
$message = "Dear Colleague,<br><br>";
$toEmail = "ramwy@myemail.com";
$fromemailid="ramwy@myemail.com";
$fromemail = "ramwy Email <".$fromemailid.">"; //\r\n optional headerfields
$headers = "From: $fromemailid\n";
mail($toEmail,$subject,$message,$headers); // LINE 48 the error line
Code: Select all
Warning: mail() [function.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:\_webserver\emailer\test_emailer.php on line 48
What should I change on ini_set() to make the email working? pls help
Thanks
Sokka