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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With