Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Nodemailer

Send emails from Node.js applications with support for multiple transport methods.

Files, images and mediaNPM

GitHubWebsite

1. License

License from npm.

github.com/nodemailer/nodemailer

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Nodemailer does

Nodemailer is a dependency-free Node.js mailer where the delivery method is a swappable part, and its README is blunt about setups that tend to fail, such as Gmail.

Nodemailer popularity

79 / 100
Gid Score, #118 overall
40.5M
downloads a week, npm
17.7K
GitHub stars
155
agent projects use it
Nodemailer: downloads per weeknpm, nodemailer 40,472,572
Nodemailer: GitHub starsnodemailer/nodemailer 17,718

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Nodemailer is used

  • Nodemailer is a dependency in 155 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.2% of the 4,867 JavaScript/TypeScript ones), #3 of 281 in files, images and media.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 481; those are left out of every share on this page.
  • Projects that use it most often also use dotenv (64.5%), Next.js (63.9%), Lucide React (63.2%).
  • It is more common in projects set up for Devin Desktop (5.0%) than for OpenAI Codex (1.5%).

By coding agent

94 projects, 3.1%
82 projects, 2.5%
56 projects, 2.3%
14 projects, 5.0%
13 projects, 2.7%
7 projects, 1.5%
7 projects, 2.0%
6 projects, 1.8%

Often used with

In 64.5% of its projects
In 63.9% of its projects
In 63.2% of its projects
In 74.8% of its projects
In 74.2% of its projects
In 55.5% of its projects
In 52.9% of its projects
In 48.4% of its projects

Nodemailer in practice

Strengths

Nothing else to install

The site says everything ships in one package. There are no runtime dependencies or native addons, and no system libraries or build tools are needed.

Transport is a swappable part

The message code stays the same while the delivery method changes. Any transport that implements one <code>send(mail, callback)</code> method can be plugged in.

A detailed receipt for each send

On success, the SMTP transport returns the accepted and rejected recipients, the server's EHLO capabilities, the message size, and timings for the envelope and the body.

Types are built in from v10

Version 10 is written in TypeScript. Old type names such as <code>Mail.Options</code> keep compiling. The README says to remove <code>@types/nodemailer</code>.

Watch out for

Node.js 20 floor

Version 10 will not run on older Node.js. The docs say to stay on the 9.x line if you are on an older runtime.

Gmail: switching beats debugging

The README says Gmail "either works well, or it does not work at all". It suggests that switching to another service is probably easier than fixing Gmail issues.

Cloudflare Workers is SMTP-only

On Workers only the SMTP-based transports apply, because <code>sendmail</code> needs a child process. The README also says <code>tls.rejectUnauthorized: false</code> fails there with an error.

More about Nodemailer

Funding
  • GitHub Sponsors: https://github.com/andris9
  • Own page: https://www.paypal.me/nodemailer
  • 7 GitHub sponsors

See all

Packages around it
  • dotenv: env file loader
  • lucide-react: icon set for React
  • next: React framework
  • zod: schema validation
  • tailwind-merge: Tailwind class merging
  • clsx: className builder
More in Files, images and media

Alternatives

Nodemailer This page

MIT-0Gid 7940.5M/wk

Compare Nodemailer with another tool

Get started

Install it.

npm install nodemailer

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Nodemailer
- Create one transporter when the application starts and reuse it. Do not call `createTransport()` for each message.
- Set `secure: true` only for port 465. Use `false` on every other port; Nodemailer still tries to upgrade to TLS if the server supports it.
- Read SMTP credentials from environment variables (`process.env.SMTP_USER`, `process.env.SMTP_PASS`), as the docs do.
- After `sendMail()`, check `info.rejected`. A message counts as sent if at least one recipient was accepted.
- On Nodemailer 10+, remove `@types/nodemailer` because types ship with the package. Import classes from `nodemailer/lib/*` with a default import.
- Target Node.js 20+. On Cloudflare Workers use only SMTP transports, and do not set `tls.rejectUnauthorized: false`, which fails there with an error.
- Call `await transporter.verify()` to catch configuration errors before sending.