My PHP code for sending mail
is:
$email_to="deepuskmr@gmail.com";
$email_subject="It works";
$email_message="Hello. I can send mail!";
$headers = "From:Dpu\r\n".
"Reply-To: sdeepu.kmr@gmail.com\r\n'" .
"X-Mailer: PHP/" . phpversion();
mail($email_to, $email_subject, $email_message, $headers);
echo "mail sent!"
But this code not sending email. It gives the error.
My php.ini file settings are
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = sdeepu.kmr@gmail.com
I am working in localhost
. And I am using windows 64
machine.