Send Email With Apache Commons Email In Java

Apache Commons Email library provides a API for sending email. Using the library, users can send email with different formats.


Here are some common classes to use: 

  • SimpleEmail
  • MultiPartEmail
  • HtmlEmail
  • ImageHtmlEmail
  • EmailAttachment

To use the libary, you need to add the following dependency in your maven based Java project pom.xml file.