Test emails without
the mock setup.
AdonisJS mailer, but framework-agnostic. Mail.fake() + Mail.assertSent() for zero-setup email testing. Works with Express, Fastify, or any Node.js app.
npm install laramailimport { Mail } from 'laramail';
// Zero-setup email testing — no SMTP server, no network, no mocks.
Mail.fake();
await Mail.to('user@example.com').send(new WelcomeEmail(user));
Mail.assertSent(WelcomeEmail, (mail) => mail.hasTo('user@example.com'));
Mail.assertSentCount(WelcomeEmail, 1);
Mail.restore();Everything You Need
A complete email toolkit with providers, templates, queues, failover, and testing — all with a fluent API.
8 Providers
SMTP, SendGrid, AWS SES, Mailgun, Resend, Postmark, Log Transport, and Custom — switch with a single config change.
Template Engines
Handlebars, EJS, and Pug support with caching, partials, and helpers built in.
Queue Support
Background email sending with BullMQ or Bull. Delay, schedule, and retry with ease.
Markdown Mail
Write emails in Markdown with button, panel, and table components. Auto-inlined CSS.
Provider Failover
Automatic failover chains with retries, delays, and monitoring callbacks.
Testing Built-in
Mail.fake() with Laravel-style assertions. Assert sent, queued, and simulate failures.
Email Events
Hook into sending, sent, and failed events for logging, analytics, and send cancellation.
Email Preview
Preview fully rendered emails without sending. Debug templates and verify headers.
Rate Limiting
Per-provider sliding window rate limiting. Stay within API limits automatically.
CLI Commands
Manage queues, preview emails, generate Mailables, and validate config from the command line.
See It In Action
A fluent, Laravel-inspired API that makes sending emails a joy.
await Mail.to('user@example.com')
.subject('Complete Example')
.html('<h1>Hello!</h1>')
.text('Hello!')
.from('custom@example.com')
.cc(['manager@example.com'])
.bcc('archive@example.com')
.replyTo('support@example.com')
.attachments([{
filename: 'report.pdf',
path: './files/report.pdf'
}])
.send();Works With Every Provider
SMTP built-in, plus first-class support for all major email APIs. Install only what you need.
SMTP
Built-in via Nodemailer. No additional install needed.
SendGrid
Twilio SendGrid cloud email delivery API.
npm install @sendgrid/mailAWS SES
Amazon Simple Email Service with IAM role support.
npm install @aws-sdk/client-sesMailgun
Powerful email API with EU region support.
npm install mailgun.js form-dataResend
Modern email API built for developers.
npm install resendPostmark
Reliable transactional email delivery.
npm install postmarkLog Transport
Log emails to console or file for development and testing.
Custom
Build your own provider by implementing the transport interface.
Ready to Send?
Get started in under a minute. One install, one configure, one send.
npm install laramail