当我在localhost中使用gmail smtp发送电子邮件时,返回长消息

时间:2017-11-20 11:25:05

标签: php email smtp phpmailer

我正在使用PHPmailer库使用wampServer从localhost发送电子邮件。我正在使用Gmail SMTP服务器。我可以发送电子邮件到我当之无愧的邮箱地址。但问题是,在发送邮件后我得到了返回消息email is sent,但同时,也会出现非常长的返回消息,这需要很长时间。为什么这条长回信息和我的回复信息一起?

screen shot of the return message

1 个答案:

答案 0 :(得分:1)

试试这个,

$mail->SMTPDebug = 0;

 (0): Disable debugging (you can also leave this out completely, 0 is the default).
 (1): Output messages sent by the client.
 (2): as 1, plus responses received from the server (this is the most useful setting).
 (3): as 2, plus more information about the initial connection - this level can help diagnose STARTTLS failures.
 (4): as 3, plus even lower-level information, very verbose, don't use for debugging SMTP, only low-level problems.