Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP & Mail API - very urgent  RSS feed

 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I am trying to write a program using JavaMail API to send msg to any mailid on any domain... In that i am getting an exception Send Msg failed notification. Anybody could help me out in giving the solution very urgently
Thanx in advance.
Roshini
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the Mail docs, you can get more information out of that SendFailedException with getMessage.
If I were you I would try to mail from an application first to check out the code.
Are you sure that the mail server is being addressed correctly and will accept mail from the "from" address you are using? Mail servers have restrictions to prevent use by spammers.
Bill

------------------
author of:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!