Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Relay access denied

843834Dec 1 2009 — edited Dec 17 2009
I'm regularly getting an error while i send email outside to my organisation on either I use sun.net.smtp or javamail api to send emails.
It's working fine withing my organisation but for outside organisation let say to::: XXX@gmail.com

code is showing following error:

Exception in thread "main" sun.net.smtp.SmtpProtocolException: 554 5.7.1 <ariser.kash@gmail.com>: Relay access denied

at sun.net.smtp.SmtpClient.issueCommand(SmtpClient.java:48)
at sun.net.smtp.SmtpClient.toCanonical(SmtpClient.java:56)
at sun.net.smtp.SmtpClient.to(SmtpClient.java:98)
at SmtpClientExample.main(SmtpClientExample.java:22)
Java Result: 1

Please help me out, I've stucked due to this.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 14 2010
Added on Dec 1 2009
7 comments
2,690 views