javax.mail.MessagingException:无法连接到SMTP主机:< host name>港口:25回复:554 [英] javax.mail.MessagingException: Could not connect to SMTP host : <host name> port : 25 response: 554
问题描述
我正在尝试使用java mail api发送邮件。我的smtp服务器是一个ibm服务器。我正面临此异常
I am trying to send mail using java mail api. My smtp server is an ibm server. I am facing this exception
javax.mail.MessagingException: Could not connect to SMTP host : <host name> port : 25 response: 554
请帮助我。
提前致谢。
推荐答案
您收到错误代码554: Access Denied Relay
。
You are getting an error code 554: Access Denied Relay
.
可能是因为您的SMTP服务器无法将您的请求视为合法,并将其阻止为垃圾邮件。
It can be caused because your SMTP server doesn't recognise your petition as legit, and blocks it as if it were SPAM.
也许您的来自帐户与服务器预期域不匹配,或者您需要在SMTP连接中添加一些附加的身份验证参数(如果没有关于代码的更多信息,很难知道) 。
Perhaps your from account doesn't match the server expected domain, or you need add some aditional autentication parameters to your SMTP connection (hard to know without more information on your code).
这篇关于javax.mail.MessagingException:无法连接到SMTP主机:< host name>港口:25回复:554的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!