php code:
<?php
$to = 'vickee@hotmail.com';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: vignesh@gmail.com' . "\r\n" .
'Reply-To: vignesh@gmail.com' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))
echo "Email sent";
else
echo "Email sending failed";
?>
I have enabled second step verification in gmail. Is the prob due to that and I get "Email sent" when I run the php code. But there are no mails in the sent or recipient's inbox or junk folder. Are there any alternative methods? If so, please comment link for step by step procedure to send emails using the service.
EDIT:
I've setup the mailing part as instructed in http://arpanthakrar.blogspot.in/2013/06/send-email-from-localhostwamp-server.html
Please do let me know if there are anyother methods or changes to be made in this method.