我使用了phpmailer。 当我在网站上提交表单时:http://rarebookstore.store/Simple%20Custom%20Form/index.php,我收到此消息,并希望将其禁用。我该怎么做?
2018-07-06 09:48:03 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP m83-v6sm4533240oia.47 - gsmtp
2018-07-06 09:48:03 CLIENT -> SERVER: EHLO rarebookstore.store
2018-07-06 09:48:03 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [50.87.144.177]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2018-07-06 09:48:03 CLIENT -> SERVER: STARTTLS
2018-07-06 09:48:03 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
2018-07-06 09:48:03 CLIENT -> SERVER: EHLO rarebookstore.store
2018-07-06 09:48:03 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [50.87.144.177]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
2018-07-06 09:48:03 CLIENT -> SERVER: AUTH LOGIN
2018-07-06 09:48:03 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2018-07-06 09:48:03 CLIENT -> SERVER: <credentials hidden>
2018-07-06 09:48:03 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2018-07-06 09:48:03 CLIENT -> SERVER: <credentials hidden>
2018-07-06 09:48:04 SERVER -> CLIENT: 235 2.7.0 Accepted
2018-07-06 09:48:04 CLIENT -> SERVER: MAIL FROM:<noahschade101@gmail.com>
2018-07-06 09:48:04 SERVER -> CLIENT: 250 2.1.0 OK m83-v6sm4533240oia.47 - gsmtp
2018-07-06 09:48:04 CLIENT -> SERVER: RCPT TO:<noahschade101@gmail.com>
2018-07-06 09:48:04 SERVER -> CLIENT: 250 2.1.5 OK m83-v6sm4533240oia.47 - gsmtp
2018-07-06 09:48:04 CLIENT -> SERVER: DATA
2018-07-06 09:48:04 SERVER -> CLIENT: 354 Go ahead m83-v6sm4533240oia.47 - gsmtp
2018-07-06 09:48:04 CLIENT -> SERVER: Date: Fri, 6 Jul 2018 04:48:03 -0500
2018-07-06 09:48:04 CLIENT -> SERVER: To: Noah Schade <noahschade101@gmail.com>
2018-07-06 09:48:04 CLIENT -> SERVER: From: sdfsd <noahschade101@gmail.com>
2018-07-06 09:48:04 CLIENT -> SERVER: Subject: Message from sdfsd
2018-07-06 09:48:04 CLIENT -> SERVER: Message-ID: <6wCj6FOzJ7DwMnJLscMVYYybpFCQQezJ8q1nAHEE@rarebookstore.store>
2018-07-06 09:48:04 CLIENT -> SERVER: X-Mailer: PHPMailer 6.0.5 (https://github.com/PHPMailer/PHPMailer)
2018-07-06 09:48:04 CLIENT -> SERVER: MIME-Version: 1.0
2018-07-06 09:48:04 CLIENT -> SERVER: Content-Type: text/plain; charset=iso-8859-1
2018-07-06 09:48:04 CLIENT -> SERVER:
2018-07-06 09:48:04 CLIENT -> SERVER: Name sdfsd
2018-07-06 09:48:04 CLIENT -> SERVER: Email jkkkj@ljnjln.com
2018-07-06 09:48:04 CLIENT -> SERVER: Details asdfsdafsdaf
2018-07-06 09:48:04 CLIENT -> SERVER:
2018-07-06 09:48:04 CLIENT -> SERVER: .
2018-07-06 09:48:05 SERVER -> CLIENT: 250 2.0.0 OK 1530870485 m83-v6sm4533240oia.47 - gsmtp
2018-07-06 09:48:05 CLIENT -> SERVER: QUIT
2018-07-06 09:48:05 SERVER -> CLIENT: 221 2.0.0 closing connection m83-v6sm4533240oia.47 - gsmtp
Warning: Cannot modify header information - headers already sent by (output started at /home4/noah9/rarebookstore.store/src/Simple Custom Form/vendor/phpmailer/src/SMTP.php:253) in /home4/noah9/rarebookstore.store/src/Simple Custom Form/index.php on line 73
答案 0 :(得分:0)
您已启用调试输出。像这样关闭它:
$mail->SMTPDebug = false;
答案 1 :(得分:0)
我找到了自己问题的答案。在index.php文件中,必须将该行注释掉:$ mail-> SMTPDebug = 2;