赞
踩
邮箱授权码错误 报错如下
Authentication failed;nested exception is 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
使用邮箱密码而非生成的授权码
org.springframework.mail.MailAuthenticationException: Authentication failed;
nested exception is 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
邮箱未开启POP3/SMTP服务
org.springframework.mail.MailAuthenticationException: Authentication failed;
nested exception is 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
工具类中:PASSWORD 填的要填写邮箱客户端授权码才行
private static final String USER = "6666666@qq.com"; // 发件人邮箱地址
private static final String PASSWORD = "*********"; // 填写自己客户端授权码
所以打开自己的邮箱生成相应的授权码进行填写,问题就能解决了
进入 QQ 邮箱网页版 按照如下顺序分别开启服务功能
开启服务功能后 会生成一个授权登录码如下:
然后将生成的授权码 放到前面的工具类中就可以进行开发啦
发送邮件成功!
另一边成功接受邮件!
手机端也收到了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。