File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes e-mail sender! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "e-mail sender!" Watch "e-mail sender!" New topic

e-mail sender!

Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
I am working on a JSP that insert all data from a form to a database when the submit button is clicked. The user need to get a password before entering the forms page.
The user send us a mail and the system have to automatically send a mail within a password.
My question is: How can i send automatic e-mail?
Any reference or information would be appreciated.
Jeff Dube
Ranch Hand

Joined: Jun 14, 2001
Posts: 44
When a ask a question to your forums, there is a check box for "Email notification". I need to do something similar to this...
that automatically send an e-mail
Adam Chace

Joined: May 24, 2001
Posts: 14
You should take a look at the JavaMail API which provides functionality for sending email in Java. If the web/appserver you are using doesn't include JavaMail support then there are a few simple classes out there that will send email as well. If this the case, email me at and I will send you one that I like to use.

Adam Chace<BR>Author of :<A HREF="" TARGET=_blank rel="nofollow">JSP Tag Libraries</A><BR><A HREF="" TARGET=_blank rel="nofollow">Chalk Creek Software</A>
Wirianto Djunaidi
Ranch Hand

Joined: Mar 20, 2001
Posts: 210

If you are going to use JavaMail API, you also need to download
Java Activatio Framework.
So you'll need mail.jar and activation.jar in your lib directory.
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
There is an excellant example of creating a taglib to utilize the JavaMail API from a JSP page in Adam's book.
[This message has been edited by Carl Trusiak (edited June 26, 2001).]

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
I agree. Here's the link:
subject: e-mail sender!
It's not a secret anymore!