springboot发送邮件报错AuthenticationFailedException: 535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256

发送邮件的密码一定要填授权码,一长串字母,不是你邮箱的登录密码

报错信息:

javax.mail.AuthenticationFailedException: 535 Login Fail. Please enter your authorization code to login. More information in http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256

打开http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256链接

进入了邮箱的帮助中心:

首先我们打开邮箱的授权码那里,一定要发送邮件的那个邮箱的授权码。


POP3/SMTP服务授权码(IMAP/SMTP服务授权码)两个都可以。随便复制一个
复制邮箱给的授权码,到yml配置文件的密码那里。properties也是一样的。

重新运行就没问题了。

猜你喜欢

转载自www.cnblogs.com/qianzf/p/12788558.html