Introduction
I am happy to announce that three new modules are available to use that simplify the job of sending emails:
- email-api: Interfaces and classes to handle emails
- email-javamail: Java Mail (JSR 919) based implementation of email-api
- email-javamail-ecm: ECM components to use email sending functionality easily within OSGi environments
Programmers can use the API to:
- Easily create emails with TEXT or HTML content or both
- Add inline images to the HTML content
- Add attachments
- Send emails
- Send multiple emails with on one channel (faster processing)
Why did we need another API?
We investigated the available APIs in Java and found the following:
- It is very difficult to use javax.mail
- Constructing emails and sending email functionality are not clearly separated in commons-email. By not having the separation, it is not possible to build solutions where the same interface can be used to send or persist emails in a queue
- Spring needs lots of dependencies that do not work well within a modularized environment
Please note that since this blog post there are several new modules that you can use:
– email-javamail-dkim: DKIM signature support for the javamail implementation of email-api
– email-store: Stores emails in database
– email-queue: Queue implementation based on the store.
ECM components for all of the modules above in separate projects. You can find them on maven central by searching for “everit email”.