<?php //email(to,subject,message,headers,parameters) $to="firstname.lastname@example.org>"; $subject="Hi"; $message="Hello my friend"; $from="email@example.com"; $headers="from:".$from; mail($to,$subject,$message,$headers); echo" mail sent"; ?>
This is a very simple php script to send an email.
However ,it is not working for me and I am getting the error.
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 F:\xampp\htdocs\email1.php on line 10 mail sent
I am using XAMPP for php.
What values should I set the in php.ini ?
Please explain in detail