简体   繁体   中英

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM