Class-based mail design
Organize email logic with dedicated mailable classes and keep transport/template concerns separate from service code.
- envelope()
- content()
- attachments()
- headers()
`nestjs-mailable` gives you class-based mailables, template engines, transport switching, retries, events, and testing utilities in one cohesive developer experience.
This package is built for teams that want clean architecture in code and predictable behavior in production.
Organize email logic with dedicated mailable classes and keep transport/template concerns separate from service code.
Switch between SMTP, SES, Mailgun, and Mailjet through typed configuration without rewriting business workflows.
Validate email behavior quickly with built-in mocks, fake transports, and test module helpers for unit and integration tests.
Pick the section that matches your current task.
Install, configure MailModule, and send your first message in minutes.
Open sectionSet up SMTP, SES, Mailgun, or Mailjet using strongly typed transport options.
Open sectionCreate reusable class-based emails with envelope, content, attachments, and headers.
Open sectionUse the built-in mocks and helper utilities to test mail behavior with confidence.
Open section