• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Spring framewok email component (send mail to gmail)

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author & internet detective
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Poonam,
What mail server are you using? Does it have rules that prohibit sending external e-mail?
 
Poonam Kadu
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Jeanne Boyarsky
author & internet detective
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
reply
    Bookmark Topic Watch Topic
  • New Topic