PHPMailer SMTP Gmail authentification error
问题 I'm sending emails using PHPMailer 5.2.10 with the next code: function SendGmail($to,$subj,$body) { $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'ssl'; // "ssl" secure transfer enabled REQUIRED for GMail $mail->Host = "smtp.gmail.com"; $mail->Port = 465; // 465 or 587 $mail->IsHTML(true); $mail->Username =