SMTPDebug = 0; // for detailed debug output
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->Username = 'kaifk5106@gmail.com'; // ashkechap75@gmail.com YOUR gmail email
$mail->Password = 'ehzmjsiiorusqbbj'; // xvywodidkgbrrznr YOUR gmail password
// Sender and recipient settings
$mail->setFrom('kaifk5106@gmail.com', 'Goavillasforsale');
$mail->addAddress('kaifk5106@gmail.com', 'Your Own Mail');
// $mail->addReplyTo('jharoshan728@gmail.com', 'Sender Name'); // to set the reply to
// Setting the email content
$mail->IsHTML(true);
$mail->Subject = "GVS Enquiry";
$mail->Body = 'name: '.$name.'
email: '.$email.'
phone: '.$phone.'
message: '.$message;
$mail->AltBody = 'Plain text message body for non-HTML email client. Gmail SMTP email body.';
$mail->send();
echo "Your enquiry has been submitted successfully..!";
} catch (Exception $e) {
echo "Error in sending email. Mailer Error: {$mail->ErrorInfo}";
}
}
?>