aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Can i send mail to other than Local Address with this code..i mean to Yahoo or Gmail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Can i send mail to other than Local Address with this code..i mean to Yahoo or Gmail" Watch "Can i send mail to other than Local Address with this code..i mean to Yahoo or Gmail" New topic
Author

Can i send mail to other than Local Address with this code..i mean to Yahoo or Gmail

Harish Tiruvile
Ranch Hand

Joined: Dec 01, 2005
Posts: 99
Hi all,

I have wrote one program to send mail to from Java application ..Here i am using XX.XX.XXX.XX SMTP address to send mail..

My problem is i can send mail from java application to my company email ID i.e harish.t@companyName.com ,if i use abc@yahoo.com or xyz@gmail.com then i am getting


Note: Abc & xyz is replaced with proper name

Can anyone tell me why i am getting this exception?

code :


Note: using that SMTP server i can send & receive mail using outlook
[ August 24, 2006: Message edited by: harish thrivile ]

Giving up is the easiest thing in the world to do..but holding it together when everything seems like falling apart is true strength!!
with regards, Harish.T
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The SMTP server you are using is not allowing you to relay messages ostensibly from another domain. If you want to relay xyz@gmail.com over this server you'll need to ask the server administrator to configure it to allow this.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can i send mail to other than Local Address with this code..i mean to Yahoo or Gmail
 
Similar Threads
java mail throws
Getting exception in sending Email from Servlet
urgent help in java mail
JavaMail works on one server, but not another
cant send mail using JavaMail API