FluDa Mail: Lightweight Mail Abstraction for Jakarta EE/CDI¶
FluDa Mail provides a simple, framework-agnostic mail abstraction for Jakarta EE and CDI applications. It defines a clean MailSender interface with built-in Jakarta Mail (SMTP) support, and makes it straightforward to integrate third-party providers like SendGrid.
The project is organized into three core modules:
| Module | Artifact | Description |
|---|---|---|
core |
fluda-mail-core |
Contains the MailSender API, MailMessage, MailBuilder, and the default JakartaMailSender implementation. Depends only on the JDK and Jakarta Mail API. |
config |
fluda-mail-config |
Integrates with MicroProfile Config to read fluda.mail.* properties and expose a MailConfig bean. |
cdi |
fluda-mail-cdi |
Provides CDI producers for MailSender and MailBuilder, wiring the core beans into a Jakarta EE environment. |
Key concepts¶
MailSender— the core interface with a singlesend(MailMessage)method. Thecoremodule providesJakartaMailSenderfor SMTP; you can implement your own for third-party services.MailMessage— a simple POJO holdingfrom,to,subject,htmlBody, andattachments.MailBuilder— a fluent builder that wraps aMailSenderand optionally aTemplateProcessorfor rendering email templates.MailConfig— configuration POJO with SMTP/POP3 properties, produced from MicroProfile Config in theconfigmodule.
Reading order¶
- Start with getting started to add dependencies and send your first email.
- Explore advanced topics for custom
MailSenderimplementations and CDI integration patterns.