File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes send a mail through servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "send a mail through servlet " Watch "send a mail through servlet " New topic
Author

send a mail through servlet

bharath cb
Greenhorn

Joined: Feb 09, 2012
Posts: 1
how to send a mail through servlet and to have conditions to set the message
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 339

Does your servlet run in a J2EE environment? Then you can just use the classes from the javax.mail package.
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

Koen Aerts wrote:Does your servlet run in a J2EE environment? Then you can just use the classes from the javax.mail package.


J2EE is not necessary to use the mail package. Just be sure to include the needed jars.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 339

Bear Bibeault wrote:J2EE is not necessary to use the mail package.

That's right and I didn't say that. The thought I had attempted to bring across was that if you're using J2EE, it should already have the mail packages included and you can just use them. Yes, if you just have the Java SE then you need to add the mail packages from one or more jar files, which I believe may be called mail.jar and activation.jar.
 
 
subject: send a mail through servlet
 
Threads others viewed
how to send email through servlet using java mail API
Sending E-Mail through an Applet
sending message from an webpage to an email addres
smtp
how to send email from servlet program
MyEclipse, The Clear Choice