Reputation: 1227
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.
Upvotes: 7
Views: 20150
Reputation: 13488
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).
Upvotes: 9