用spring发送邮件,使用的是QQ邮箱,出现以下错误信息:
/*Exception in thread "main" org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 454 Authentication failed, please open smtp flag first!
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:392)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
at cn.com.songjy.spring.mail.SpringSendMail.sendHtml(SpringSendMail.java:97)
at cn.com.songjy.spring.mail.SpringSendMail.main(SpringSendMail.java:60)
Caused by: javax.mail.AuthenticationFailedException: 454 Authentication failed, please open smtp flag first!
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:823)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673)
at javax.mail.Service.connect(Service.java:295)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
... 4 more*/
原因是我使用的QQ邮箱没有开通POP3/SMTP服务,登录邮箱开启该服务即可
利用Spring框架封装的JavaMail实现同步或异步邮件发送
分享到:
相关推荐
主要给大家介绍了关于MySQL连接抛出Authentication Failed错误的分析与解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
本项目用于实际单点登录项目中集成cas修改项目登录页,直接解压项目导入ecliplse即可以使用,脚本用原来自带的就可以
从3GPP协议和UE端行为分析5G gsm cause #29的网络问题
163邮箱535 Error authentication failed;163邮箱535 Error authentication failed
主要是一篇关于SMTP Service Extension for Authentication的外文文献
SecureCRT keygen
Authentication Users Privacy An Integrating Location Privacy Protection Algorithm for Secure Moving Objects in Location Based Services。本文引入了一种新的查询隐私算法,称为认证速度动态传输模式隐藏算法...
最好的joomla后台安全组件,2.0版本后变成收费版本,功能强大了很多。是所有joomla站点必装的组件。 该资源包含了joomla1.5与joomla1.6的组件,不容错过
NULL 博文链接:https://vernonchen163.iteye.com/blog/1995514
Quantum authentication of classical messagesQuantum authentication of classical messagesQuantum authentication of classical messages
FormsAuthentication 权限验证
"msg": "authentication failed:authentication failed:invalid authorization", "request_id": "173b657d6fde423192ef21817ea61e63" } postman测试通过,与官方提供工具生产字符串一致 { "code": 0, "data": {...
Authentication protocols are the basis of security in many distributed systems, and it is therefore essential to ensure that these protocols function correctly. Unfortunately, their design has been ...
AnAppledeviceverifieswhetherathird-partyaccessoryattachedtoitisauthorizedforusewiththeApple devicebyissuinganauthenticationchallengetotheaccessory.TheaccessorymustrespondtotheApple device'schallenge
802.1x Authentication
CADSContinuous Authentication on Data Streams
一款非常好用的连接linux系统的远程工具。使用介绍:解压后,双击文件中的SecureCRT.exe,打开后数据输入目标linux系统的IP、端口号、用户名及密码就可以连接上了。
(1)认证任务:待遇管理单位根据工作需要,安排在某时间段内完成的生存认证工作。 (2)工作时段:完成此项认证任务的起止时间; (3)任务名称:例如“城乡居民基本养老保险2018第2季度资格认证”,划线部分在任务策划...
Passwordless Authentication With Golang