PHPMailer only sends email when SMTPDebug = true
问题 I'm using PHPmailer. It works when $mail->SMTPDebug = true; but when I remove that line, it silently fails. I say silently fails as it doesn't give any errors, and yet the email doesn't seem to be delivered. $mail = new PHPMailer; $mail->SMTPDebug = true; $mail->SMTPAuth = true; $mail->CharSet = 'utf-8'; $mail->SMTPSecure = 'ssl'; $mail->Host = 'smtp.gmail.com'; $mail->Port = '465'; $mail->Username = 'xxxxx@gmail.com'; $mail->Password = 'xxxxx'; $mail->Mailer = 'smtp'; $mail->AddReplyTo(