I am trying to send a mail through core Php, I have created a file email.php and included PHPMailer_v5.1 in it.. here is my php code,
<?php if($_POST){
$email = $_REQUEST['email'] ;
$comments = $_REQUEST['comments'] ;
$phone = $_POST['telephone'] ;
$name = $_REQUEST['name'] ;
$mail = new PHPMailer();
$mail->Host = "localhost";
$mail->From = "scorpion.schizo@gmail.com";
$mail->FromName = "Showket";
$mail->AddAddress("manusurya9139@gmail.com");
$mail->Subject = "Feedback form results";
$mail->Body="
Name: $name
Email: $email
Telephone: $telephone
Comments: $comments";
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}
else
{
echo 'Thank you for your feedback.';
}
}
?>
when i post this form it gives me the right message Thank you for your feedback. but i didnt recieve the message..do i need to configure anything else ?
Try setting Gmail as your SMTP