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 @impruthvi/nodemailimport { Mail } from '@impruthvi/nodemail';
Mail.configure({
default: 'smtp',
from: { address: 'noreply@example.com', name: 'My App' },
mailers: {
smtp: {
driver: 'smtp',
host: 'smtp.example.com',
port: 587,
auth: { user: 'username', pass: 'password' },
},
},
});
await Mail.to('user@example.com')
.subject('Welcome!')
.html('<h1>Hello World!</h1>')
.send();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.
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 postmarkReady to Send?
Get started in under a minute. One install, one configure, one send.
npm install @impruthvi/nodemail