What problem does it solve?
Enables ColdBox and BoxLang applications to send transactional and notification emails without manual SMTP handling, simplifying templating, attachments, protocol selection, and safe testing workflows.
Core Features & Use Cases
- Protocol Flexibility: Configure and switch between SMTP, Postmark, SendGrid, Mailgun, or a NullProtocol for tests via module settings and environment variables.
- Fluent Mail Builder: Construct emails with recipients, CC/BCC, reply-to, subjects with token substitution, HTML/text bodies, and attachments using a chainable API.
- Templating & Tokens: Render ColdBox view templates for HTML bodies and replace tokens for personalized content; suitable for transactional emails like welcome messages and invoices.
- Async & Testing: Queue emails for background delivery to avoid blocking request threads and use the NullProtocol to avoid sending real mail in test suites.
- Production Best Practices: Encourages environment-driven credentials, protocol switching per environment, result logging, and recipient validation.
Quick Start
Send a templated HTML welcome email to a new user using the mailService fluent builder with an environment-configured protocol.