javax.mail.MessagingException: Could not connect to SMTP host : <host name> port : 25 response: 554

末鹿安然 提交于 2019-12-12 10:46:13

问题


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

pls help me.

Thanks in advance.


回答1:


You are getting an error code 554: Access Denied Relay.

It can be caused because your SMTP server doesn't recognise your petition as legit, and blocks it as if it were SPAM.

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).



来源:https://stackoverflow.com/questions/5429766/javax-mail-messagingexception-could-not-connect-to-smtp-host-host-name-port

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!