#ICYMI: In this quick article, we are going to see how to use the JavaMail API to send via an outgoing SMTP server, an HTML email generated with the Apache Groovy Templates module in a Java SE application. We will first design a simple and reusable mail API on top of it, before replacing it with the convenient Apache Commons Email API to not reinvent the wheel.
Using JavaMail API
JavaMail is a Java API, which provides protocol-independent and platform-independent frameworks for sending and receiving mail via SMTP, POP3, and IMAP. It is built into the Java EE platform, but also provides an optional package for use in Java SE. There are two packages that are used in JavaMail API: javax.mail and javax.mail.internet. These packages contain many classes for JavaMail API. https://goo.gl/kvZtYc