当前位置:编程学习 > asp >>

jmail发信提示454错误jmail.ErrorCode 454解决方法

原因是我使用的QQ邮箱没有开通POP3/SMTP服务,登录邮箱开启该服务即可

454 Authentication failed, please open smtp flag first!

用jamil发送邮件,使用的是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*/
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,