• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending Email from a jsp application

 
Santhana Lakshmi.S
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In My project i want to send emails from my application itself.
I tried to do this after reading the article and sample code given in this page
http://www.stardeveloper.com/articles/display.html?article=2001101101&page=1
But it is not working.
Can anyone give me an idea of how to do it?

Thanx a lot in advance.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you getting? Any errors? Exceptions?
 
Santhana Lakshmi.S
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Im getting exception that "Could not send mail"
In that article they told that if the sender and receiver's id are illegal this exception will come.
But my mailserver name,sender's and receiver's id are legal and correct only.
Do u ve any idea how to overcome this
Thanx a lot for ur reply
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to Other Java APIs.
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing you should do is to write a small self-contained standalone program that tries to send an e-mail message. Don't put the code into a JSP yet because a JSP is a really bad testing device. And read the JavaMail FAQ, which will almost certainly contain the answer to your question.
[ April 24, 2006: Message edited by: Paul Clapham ]
 
Sunesh Kumar
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I tried the application which is there in your link.

It worked for me ,let me know 1 thing have u changed the

"mail.smtp.host" to your hostname...may be this helps you.

Bye
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!