开发者

Java Mail API Relaying denied error

开发者 https://www.devze.com 2023-04-04 19:37 出处:网络
I am facing some weird problem, I have installed the SMTP server on my AIX box and I am successful to send email using the following command:

I am facing some weird problem, I have installed the SMTP server on my AIX box and I am successful to send email using the following command: mailx -s "Hola Mundo" email@domain.com < /tmp/test.txt

But when I am sending the email using the javamail api I am getting following exception, could you help me how to resolve that.

javax.mail.SendFailedException: Invalid Addresses;
  nested exception is: 
    javax.mail.SendFailedException: 550 5.7.1 <email@domain.com>... Relaying denied

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:632)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:306)

    at SendMailUsage.main(SendMai开发者_开发知识库lUsage.java:59)

and I am sure my email address is perfect one.


Check out the RFC 2821 (Simple Mail Transfer Protocol), especially the part about STMP replies: https://www.rfc-editor.org/rfc/rfc2821#section-4.2

Status reply starting with 5xx indicates a permanent error. In your case your SMTP server is not configured to route mails to your given destination address.


Issue has been resolved by modifying the sendMail.cf file on the server side. My aix admin informed me that it was due to some DNS issue, will update the solution as soon as I hear from him

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号