草庐IT

SMTPDebug

全部标签

PHPMailer 仅在 SMTPDebug = true 时发送电子邮件

我正在使用PHPmailer。它在$mail->SMTPDebug=true时起作用;但是当我删除那条线时,它默默地失败了。我说默默地失败了,因为它没有给出任何错误,但电子邮件似乎没有送达。$mail=newPHPMailer;$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->Pass