Nodemailer

Email sending library for Node.js using SMTP, SES, or other transports. Nodemailer handles email composition (HTML/text, attachments, inline images, calendar events) and transport (SMTP, AWS SES, Sendmail). The standard Node.js library for email — used before transactional email APIs existed and still relevant for custom SMTP configurations, self-hosted mail, or when avoiding external email APIs.

Evaluated Mar 06, 2026 (0d ago) v6+
Homepage ↗ Repo ↗ Communication email smtp node transactional attachments html-email
⚙ Agent Friendliness
63
/ 100
Can an agent use this?
🔒 Security
82
/ 100
Is it safe for agents?
⚡ Reliability
82
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
90
Error Messages
85
Auth Simplicity
78
Rate Limits
80

🔒 Security

TLS Enforcement
90
Auth Strength
80
Scope Granularity
78
Dep. Hygiene
82
Secret Handling
80

SMTP credentials must be in environment variables — never hardcoded. TLS support for SMTP connections. OAuth2 for Gmail is more secure than app passwords.

⚡ Reliability

Uptime/SLA
82
Version Stability
85
Breaking Changes
82
Error Recovery
80
AF Security Reliability

Best When

You need SMTP-based email sending from Node.js and either have an existing SMTP server, want to self-host, or use AWS SES without an API wrapper.

Avoid When

You need managed email deliverability, email analytics, or template management — transactional email APIs (Resend, Postmark) offer more value.

Use Cases

  • Send transactional emails (password reset, notifications) from Node.js servers using SMTP or SES transport
  • Send emails with attachments (PDFs, reports, exports) from agent automation workflows
  • Test email sending in development with Nodemailer's test account (Ethereal) or Mailhog/Mailpit local dev servers
  • Build email sending without external email API dependencies — use existing SMTP server or self-hosted Postfix
  • Send calendar invites (.ics files) via email in Node.js agent scheduling workflows

Not For

  • Marketing email campaigns — use Mailchimp or Brevo for bulk/marketing email
  • Transactional email with advanced deliverability — Resend, Postmark, or SendGrid have better deliverability infrastructure
  • HTML email template rendering — combine with MJML or React Email for template generation

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: username_password oauth
OAuth: Yes Scopes: No

SMTP auth (username/password), OAuth2 for Gmail, or no-auth for relay servers. AWS SES integration uses AWS credentials.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT-licensed open source library. Email costs depend on SMTP provider used.

Agent Metadata

Pagination
none
Idempotent
Partial
Retry Guidance
Not documented

Known Gotchas

  • Gmail OAuth2 setup is complex — modern Gmail blocks basic SMTP auth; require OAuth2 configuration or use Google Workspace SMTP relay instead of personal Gmail
  • SMTP connection reuse with pool: true reduces overhead for bulk sending — without pooling, each send opens a new TCP connection which is slow for many emails
  • Attachments passed as Buffer or path — strings are NOT auto-converted; always pass content as Buffer or file path
  • HTML email rendering requires explicit 'html' option — setting only 'text' sends plain-text only; set both for proper fallback
  • SES transport is in @aws-sdk/client-ses wrapper — the official nodemailer-transport-ses is deprecated; use @aws-sdk/client-ses directly with Nodemailer's SES adapter
  • Test accounts via nodemailer.createTestAccount() use Ethereal — good for CI testing to see rendered emails; don't use Ethereal in production

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Nodemailer.

$99

Scores are editorial opinions as of 2026-03-06.

5178
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered