如何在响应时删除不需要的服务器信息

时间:2016-02-27 15:54:05

标签: ajax phpmailer

我认为这只是一个非常简单的问题,但我似乎无法在谷歌找到答案,或者我只是使用错误的条款。

我正在使用PHP Mailer发送电子邮件,这没问题。

我的问题出在我收到其他信息的响应标题上。一些smtp客户端 - >服务器信息。这很好,所有,帮助我看到smtp的状态,但现在我无法从页面读取ajax响应。

有没有办法删除客户端 - >服务器信息或只是读取ajax页面返回值的方法?

2016-02-27 15:42:06 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP e1sm26974173pas.1 - gsmtp
2016-02-27 15:42:06 CLIENT -> SERVER: EHLO localhost
2016-02-27 15:42:07 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [121.54.58.240]
                                      250-SIZE 35882577
                                      250-8BITMIME
                                      250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
                                      250-ENHANCEDSTATUSCODES
                                      250-PIPELINING
                                      250-CHUNKING
                                      250 SMTPUTF8
2016-02-27 15:42:07 CLIENT -> SERVER: AUTH LOGIN
2016-02-27 15:42:07 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2016-02-27 15:42:07 CLIENT -> SERVER: aUhlbHAuc3d1QGdtYWlsLmNvbQ==
2016-02-27 15:42:07 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2016-02-27 15:42:07 CLIENT -> SERVER: aWhlbHAxMjM0
2016-02-27 15:42:08 SERVER -> CLIENT: 235 2.7.0 Accepted
2016-02-27 15:42:08 CLIENT -> SERVER: 
2016-02-27 15:42:08 SERVER -> CLIENT: 250 2.1.0 OK e1sm26974173pas.1 - gsmtp
2016-02-27 15:42:08 CLIENT -> SERVER: 
2016-02-27 15:42:08 SERVER -> CLIENT: 250 2.1.5 OK e1sm26974173pas.1 - gsmtp
2016-02-27 15:42:08 CLIENT -> SERVER: DATA
2016-02-27 15:42:09 SERVER -> CLIENT: 354  Go ahead e1sm26974173pas.1 - gsmtp
2016-02-27 15:42:09 CLIENT -> SERVER: Date: Sat, 27 Feb 2016 16:42:06 +0100
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: 
2016-02-27 15:42:09 CLIENT -> SERVER: 
2016-02-27 15:42:09 CLIENT -> SERVER: Subject: Reset password complete
2016-02-27 15:42:09 CLIENT -> SERVER: Message-ID: <fcad829908390aaf1cf72f28886ac1d5@localhost>
2016-02-27 15:42:09 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.13 (https://github.com/PHPMailer/PHPMailer)
2016-02-27 15:42:09 CLIENT -> SERVER: MIME-Version: 1.0
2016-02-27 15:42:09 CLIENT -> SERVER: Content-Type: multipart/alternative;
2016-02-27 15:42:09 CLIENT -> SERVER:   boundary="b1_fcad829908390aaf1cf72f28886ac1d5"
2016-02-27 15:42:09 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: This is a multi-part message in MIME format.
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: --b1_fcad829908390aaf1cf72f28886ac1d5
2016-02-27 15:42:09 CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: 
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: --b1_fcad829908390aaf1cf72f28886ac1d5
2016-02-27 15:42:09 CLIENT -> SERVER: Content-Type: text/html; charset=us-ascii
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: 
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: --b1_fcad829908390aaf1cf72f28886ac1d5--
2016-02-27 15:42:09 CLIENT -> SERVER:
2016-02-27 15:42:09 CLIENT -> SERVER: .
2016-02-27 15:42:09 SERVER -> CLIENT: 250 2.0.0 OK 1456587732 e1sm26974173pas.1 - gsmtp
2016-02-27 15:42:09 CLIENT -> SERVER: QUIT
2016-02-27 15:42:10 SERVER -> CLIENT: 221 2.0.0 closing connection e1sm26974173pas.1 - gsmtp
1

我基本上只需要在结尾处使用“1”作为ajax调用的确认。

请帮忙。谢谢

1 个答案:

答案 0 :(得分:0)

哇,我一发现就找到了答案。 只需要删除

$mail->SMTPDebug  = 2; 

我有多傻。不管怎样,谢谢!