I use newer xampp 1.8.3 and do the setting like the old one. I only changed the code in php.ini and sendmail.ini. And I use gmail to send emails from localhost.
Here is the changed code for php.ini:
//remove the semicolon
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
And here is changed code for sendmail.php:
defaults
logfile "C:\xampp\sendmail\sendmail.log"
# SMTP Gmail
account Gmail
tls on
port 465
tls_starttls off
tls_certcheck off
host smtp.gmail.com
from my-gmail-id@gmail.com
auth on
user my-gmail-id@gmail.com
password my-gmail-password
account default : Gmail
And here is the code for sending email:
<?php
$to = "my-gmail-id@gmail.com";
$subject = "Send Email";
$msg = "Send Email From Localhost";
mail($to, $subject, $msg);
?>
Please help. Thank you.