I want to send mail by using phpmailer. I googled it and got link which provide me instruction. I have used following code.
require 'PHPMailer-master/PHPMailerAutoload.php';
$mail = new PHPMailer(true);
$mail->setFrom('xxx@gmail.com');
$mail->addAddress('xyz@gmail.com');
$mail->Subject = 'First PHPMailer Message';
$mail->Body = 'Hi! This is my first e-mail sent through PHPMailer.';
if(!$mail->send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
In the result, mail is not send. There is no Error. And output is Message has been sent.
Can anyone help me to solve this.
Thanx..