尝试使用带有phpmailer的谷歌smtp从我的网站发送通知邮件到我自己,我得到了一个点,我有一个刷新令牌。
当我尝试测试邮件时,我得到以下调试错误:
SERVER -> CLIENT: 220 smtp.gmail.com ESMTP h6sm35172248paf.23 - gsmtp
CLIENT -> SERVER: EHLO localhost
SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2001:569:78a5:aa00:8d54:17b8:c04b:1f31]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 2.0.0 Ready to start TLS
CLIENT -> SERVER: EHLO localhost
SERVER -> CLIENT: 250-smtp.gmail.com at your service, [2001:569:78a5:aa00:8d54:17b8:c04b:1f31]250-SIZE 35882577250-8BITMIME250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH250-ENHANCEDSTATUSCODES250-PIPELINING250-CHUNKING250 SMTPUTF8
CLIENT -> SERVER: AUTH XOAUTH2 dXNlcj1qYWNvYi5iYWxhYmFub3ZAZ21haWwuY29tAWF1dGg9QmVhcmVyIHlhMjkuQ2pIY0FneVhWcjlvdWVSUjRYN3o1aFhvYVFrRHROTDRONEwyd21DekpfTS1FWnpESWRQSHFlZlZTSEJTa3gwLXJDZ0oBAQ==
SERVER -> CLIENT: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
SMTP ERROR: AUTH command failed: 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/answer/14257 h6sm35172248paf.23 - gsmtp
SMTP ERROR: QUIT command failed: 535-5.7.8 Username and Password not accepted. Learn more at535 5.7.8 https://support.google.com/mail/answer/14257 h6sm35172248paf.23 - gsmtp
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
string 'SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting' (length=82)
所以我尝试了一切,我不知道该怎么做......