Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 443
Sreekanth P Avatar asked Mar 25 '11 07:03

Sreekanth P


1 Answers

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

like image 115
Tomas Narros Avatar answered Sep 22 '22 09:09

Tomas Narros