Email for Node.js,
Done Right.

A fluent, provider-agnostic email library for Node.js with built-in templates, queues, failover, and testing utilities.

$npm install laramail

Everything You Need

A complete email toolkit with providers, templates, queues, failover, and testing — all with a fluent API.

6 Providers

SMTP, SendGrid, AWS SES, Mailgun, Resend, Postmark — switch providers 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.

typescript
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.

Included in base package

SendGrid

Twilio SendGrid cloud email delivery API.

npm install @sendgrid/mail

AWS SES

Amazon Simple Email Service with IAM role support.

npm install @aws-sdk/client-ses

Mailgun

Powerful email API with EU region support.

npm install mailgun.js form-data

Resend

Modern email API built for developers.

npm install resend

Postmark

Reliable transactional email delivery.

npm install postmark
0
Providers
0
Tests Passing
0%+
Code Coverage

Ready to Send?

Get started in under a minute. One install, one configure, one send.

$npm install laramail