我正在使用phpmailer为aws服务器上托管的应用程序发送电子邮件,smtp主机使用的是smtp.gmail.com.It适用于我在gmail上创建的所有电子邮件,除了一些像info @ xxxx之类的东西.com,这也是一个gmail帐户,我可以使用凭据成功登录,我已经设置了启用smtpdebug和日志显示如下所示
2018-04-30 12:14:24 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP n5sm3109946pff.134 - gsmtp<br>
2018-04-30 12:14:24 CLIENT -> SERVER: EHLO 50.123.49.209<br>
2018-04-30 12:14:24 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [50.123.49.209]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8<br>
2018-04-30 12:14:24 CLIENT -> SERVER: STARTTLS<br>
2018-04-30 12:14:24 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS<br>
2018-04-30 12:14:24 CLIENT -> SERVER: EHLO 50.123.49.209<br>
2018-04-30 12:14:24 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [50.123.49.209]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8<br>
2018-04-30 12:14:24 CLIENT -> SERVER: AUTH LOGIN<br>
2018-04-30 12:14:24 SERVER -> CLIENT: 334 VXNlcm5hbWU6<br>
2018-04-30 12:14:24 CLIENT -> SERVER: <credentials hidden><br> 2018-04-30 12:14:24 SERVER -> CLIENT: 334 UGFzc3dvcmQ6<br> 2018-04-30 12:14:24 CLIENT -> SERVER: <credentials hidden><br>
2018-04-30 12:14:24 SERVER -> CLIENT: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbuJ534-5.7.14 05Jvy6Ed1Z74_ltxq21C1R21LkDHQQxMNTnbtEujxy4pcVdYjChKwWT6R5utiNx7CR17xS534-5.7.14 Lz4uoRCWgOTjzsenrrLPg-5YNpbhxen-04ja1OP1NE16nqwNPMVkiWszrRwDT3WJM4YFCUdx534-5.7.14 Ue3YENnFdql9obazBzp1k2fm3kKk1cGjq5m27faTcO1txX4Y8oKs6Zl3Hjz40-mGcChHB_534-5.7.14 w10UYZM0Vj-X4MNeATZmrByU-LzhU> Please log in via your web browser and534-5.7.14 then try again.534-5.7.14 Learn more at534 5.7.14 https://support.google.com/mail/answer/78754 n5sm3109946pff.134 - gsmtp<br>
2018-04-30 12:14:24 SMTP ERROR: Password command failed: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbuJ534-5.7.14 05Jvy6Ed1Z74_ltxq21C1weR21LkDHQQxMNTnbtEujxy4pcVdYjChKwWT6R5utiNx7CR17xS534-5.7.14 Lz4uoRCWgOTjzsenrrLPg-5YNpbhxen-04ja1OP1NE16nNPMVkiWszrRwDT3WJM4YFCUdx534-5.7.14 Ue3YENnFdql9obazBzp1k2fm3kKk1cGjq5m27faTcO1txX4Y8oKs6Zl3Hjz40-mGcChHB_534-5.7.14 w10UYZM0Vj-X4MNeATZmrByU-LzhU> Please log in via your web browser and534-5.7.14 then try again.534-5.7.14 Learn more at534 5.7.14 https://support.google.com/mail/answer/78754 n5sm3109946pff.134 - gsmtp<br> SMTP Error: Could not authenticate.<br>
2018-04-30 12:14:24 CLIENT -> SERVER: QUIT<br>
2018-04-30 12:14:24 SERVER -> CLIENT: 221 2.0.0 closing connection n5sm3109946pff.134 - gsmtp<br>
SMTP Error: Could not authenticate.<br>