我正在使用Java Mail API,我收到了这个奇怪的错误:"初始访问检查失败"
我的配置看起来很好,网址,用户,密码等等。只是无法弄清楚为什么会出现此消息。
550 5.7.1 Initial access check failure
DEBUG SMTP: got response code 550, with response: 550 5.7.1 Initial access check failure
RSET
250 2.5.0 Ok.
DEBUG SMTP: MessagingException while sending, THROW:
com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Initial access check failure
;
nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 550 5.7.1 Initial access check failure
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2133)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1630)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1132)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at com.mrd.utilities.SendMailMessage.sendNewsMobileDeviceAlert(SendMailMessage.java:277)
at DBManager.sendLowVolumeEmailAlert(DBManager.java:241)
at DBManager.executeQuery(DBManager.java:168)
at DBManager.getConnection(DBManager.java:109)
at MainClass.main(MainClass.java:37)
Caused by: com.sun.mail.smtp.SMTPSenderFailedException: 550 5.7.1 Initial access check failure
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1637)
... 8 more
QUIT
221 2.3.0 Bye received. Goodbye.
答案 0 :(得分:0)
我遇到了这个问题并通过在SMTP服务器上提供对我的服务器和发件人电子邮件ID的访问来解决它。 SMTP服务器受限于哪个服务器可以从哪个发件人电子邮件ID发送电子邮件。与您的SMTP管理员联系,让他们授予您的服务器IP和发件人电子邮件ID的权限。