arg20 arg20 - 1 year ago 119
Java Question

Sending e-mails in JAVA EE 6

I'm developing a Java EE 6 application deployed on glassfish, I keep reading tutorials about how to send emails but they seem either outdated or too complicated. I was hoping that may be in this specification there's a rather simple way to send mail since so many things have become so much simpler.
Can you point me in the right direction or may be show me some sample code?

Answer Source

You can utilize apache commons email or if you are using Spring then use spring mail. There is always JavaMail if you don't want to use any of the wrapper libraries and a code sample on it.

All of these links have code examples.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download