| 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)
|
|
|