PHPMailer not working: Message could not be sent
问题 I am trying to create a contact form on my website using PHPMailer. I am having some trouble setting it up. I am trying to use G-mail as my smtp host. I was wondering if anyone can help troubleshoot this? This is my mailer code: <?php require("class.phpmailer.php"); require("class.smtp.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // turn on SMTP authentication $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail $mail->Host = 'smtp.gmail.com';