I have installed xampp.
I am trying phpmailer to send email to root@localhost.com
I have created root@localhost.com account in Microsoft Outlook.
When trying to send email from Outlook to root@localhost.com, It is working.
But when I am trying to send email from PHP script on localserver, Email is not getting sent..Getting error.
I am trying following PHP code.
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$body = "Testing";
$sub = "Testing Email";
$mail->IsHTML(true); 
//$mail->IsSMTP();
$mail->Host = "localhost"; // SMTP server
$mail->From = "root@localhost.com"; // Your Full Email ID on your Domain
$mail->FromName = "Root User"; // Your name or Domain
$mail->AddAddress("root@localhost.com");
$mail->Subject = $sub;
$mail->Body = $body;
$mail->WordWrap = 50;
 if($mail->Send()){
    echo "Success";
}else{
    echo "Email Not Sent";
}
?>
I am getting the error
Email Not Sent
I have googled for this issue. Setup Mercury, made changes accordingly in php.ini and sendmail.ini files too...
But No Success...
 
     
     
    