JavaMail 553 You are not authorized to send mail
  • 2023-03-29 12:19:36
  • 9928 热度
  • 0 评论

做JavaMail时发生如下错误,字面意思是需要验证,可是我的配置是没有错的!
重新设置连接和服务配置,最后修改发送人时才发现如果使用的是那个帐号发送邮件,那么发送人必须与你连接时的用户名对应的邮箱格式一样名字必须对应!可以这样想,如果你使用网易公司服务器发送邮件而你邮件发送人写了别人,你这是要做什么呢?

Exception in thread "main" com.sun.mail.smtp.SMTPSendFailedException: 553 You are not authorized to send mail, authentication is required
 at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1829)
 at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1368)
 at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:886)
 at org.hawk.util.SendMail.sendBodyMail(SendMail.java:132)
 at org.hawk.util.SendMail.main(SendMail.java:146)

 

相信你也理解这个问题的关键点所在。



alay

Flame

Hello world!

0 评论
留下评论