File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

send a mail through servlet

 
bharath cb
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to send a mail through servlet and to have conditions to set the message
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic