javax.mail.SendFailedException: Invalid Addresses; nested exception is: class com.sun.mail.smtp.SMTPSendFailedException: 553 sorry, relaying den ied from your location [18.104.22.168] (#5.7.1)
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1072) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:492) at javax.mail.Transport.send0(Transport.java:151) at javax.mail.Transport.send(Transport.java:80) at Mailapp.send(Mailapp.java:67) at Mailapp.main(Mailapp.java:22)
The mail server doesn't like the IP address from which you're sending. This is a common thing for company servers - they only allow email to be sent from within the company network. You can try talking the email admins into relaxing this rule.
They can add your system to the allowable relay hosts, or they might tell you to use SSH port tunneling to connect at a system to system level. With ssh port tunneling, you will need to tweak the port and host of your code calling the SMTP routines
posted 11 years ago
Thanks for your mails.
from outlook express, i have configured my company id.
using outlook, I am able to send mails to any e-mail id.
but why i am not able to send using java mail program?