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(SendMailUsage.java:59)
and I am sure my email address is perfect one.
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