This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes send a mail through servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
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: 344

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

Joined: Jan 10, 2002
Posts: 60792
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: send a mail through servlet
 
Similar Threads
how to send email from servlet program
smtp
Sending E-Mail through an Applet
sending message from an webpage to an email addres
how to send email through servlet using java mail API