I need to send e-mails from a servlet running within Tomcat. I\'ll always send to the same recipient with the same subject, but with different contents.
What\'s a sim
JavaMail can be a bit of a pain to use. If you want a simpler, cleaner, solution then have a look at the Spring wrapper for JavaMail. The reference docs are here:
http://static.springframework.org/spring/docs/2.5.x/reference/mail.html
However, this does mean you need Spring in your application, if that isn't an option then you could look at another opensource wrapper such as simple-java-mail:
simplejavamail.org
Alternatively, you can use JavaMail directly, but the two solutions above are easier and cleaner ways to send email in Java.