File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring framewok email component (send mail to gmail) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Spring framewok email component (send mail to gmail)" Watch "Spring framewok email component (send mail to gmail)" New topic
Author

Spring framewok email component (send mail to gmail)

Poonam Kadu
Ranch Hand

Joined: Jul 21, 2006
Posts: 49
Hi Friends,
i've succeeded in sending emails using spring framework email component, within my organisation's email id's.But what are the additional points i need to take care of if i have to send a mail to say a gmail id?I got the following error when i tried to send mail from my org's id to my gmail id.

Failed message 1:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 554 Relay rejected for policy reasons.

please advice.

cheers,
Poonam
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 23635

Poonam,
What mail server are you using? Does it have rules that prohibit sending external e-mail?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Certs: SCEA Part 1, Part 2 & 3 & Core Spring 3, OCAJP
Poonam Kadu
Ranch Hand

Joined: Jul 21, 2006
Posts: 49
Hi Jeanne,
I guess it's not prohibitting to send external mails because using my org's mailid i can send mail to gmail mailID's.
correct me if i am wrong..
Thanks,
Poonam.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

Lots of stuff could cause this, depending on how the mail server is configured...

You don't mention whether you are authenticating with the mail server before sending - perhaps it allows internal mail without authentication, but prevents outgoing mail? Maybe the account or IP you're using to send email has been configured not to allow external mail?


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 23635

Poonam Kadu wrote:I guess it's not prohibitting to send external mails because using my org's mailid i can send mail to gmail mailID's.\

Not necessarily. Your normal e-mail server is able to do that. If you are using a different one for the Java program, the rules could be more restrictive. Where I work, some servers can send external mail and some can't.
 
 
subject: Spring framewok email component (send mail to gmail)
 
Threads others viewed
How to send mail from jsf, can anybody tell me the a-z guide for this
sendig e mail form servlet
what can be the sender's email ID ? + Java Mail API
new to James Mail Server
Java Developers - San Antonio, TX
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture