I have installed xampp.
I am trying phpmailer to send email to [email protected]
I have created [email protected]
account in Microsoft Outlook.
When trying to send email from Outlook to [email protected]
, 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 = "[email protected]"; // Your Full Email ID on your Domain
$mail->FromName = "Root User"; // Your name or Domain
$mail->AddAddress("[email protected]");
$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...