NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #2141 most downloaded on npm
Easy as cake e-mail sending from your Node.js applications
Latest stable
10.5.0
Last release 12 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
340 releases · first in 2011
Drag across the ruler to compare, or tap a release to open it.
Adds per-message cancellation to sendMail() with an AbortSignal, plus two encoding fixes: DKIM signatures for internationalized domains, and header te
<!-- release-notes:start -->
Adds per-message cancellation to sendMail() with an AbortSignal, plus two encoding fixes: DKIM signatures for internationalized domains, and header text that looks like a broken encoded-word.
d= tag named a different domain than From:, so verification and DMARC alignment failed.sendMail({ ..., signal }) on SMTP and pooled SMTP. An abort removes a queued message from the pool, or closes only the connection delivering it, and the send fails with an AbortError (code EABORT). Other transports honor a signal that is already aborted and otherwise ignore it. Note that an abort late in DATA does not prove the server did not accept the message, so do not treat EABORT as safe to retry blindly.d= domain is encoded with UTS-46 mapping, the same way as the address headers.=?utf-8?Q?a b?= across a space) is now encoded. A valid encoded-word is still passed through, so subjects that are already encoded are not encoded twice.<!-- release-notes:end -->
Your coding agent can read these notes before it upgrades. Set up the MCP server →
A security patch release. Two cases where the recipient domain Nodemailer delivered to could differ from the domain an application had validated are f
<!-- release-notes:start -->
A security patch release. Two cases where the recipient domain Nodemailer delivered to could differ from the domain an application had validated are fixed. SpacePost is added to the well-known services.
url.domainToASCII and other UTS-46 validators map them. Previously a few characters could encode to a different domain than the validator approved. Affected since 9.1.0.service: 'SpacePost' (smtp.spacepost.dev, port 25976, STARTTLS required).<!-- release-notes:end -->
The pooled SMTP transport can now be closed with close({ force: true }), which also ends connections that are in the middle of delivering a message. A
<!-- release-notes:start -->
The pooled SMTP transport can now be closed with close({ force: true }), which also ends connections that are in the middle of delivering a message. A plain close() behaves as before.
No hurry for most users. Upgrade if you use pool: true and need to abandon a delivery that a server is stalling, for example one that trickles its replies so no socket timeout ever fires.
transporter.close({ force: true }) closes busy pooled connections as well as idle ones. The messages they were delivering fail at once with an error instead of being queued again, and messages still waiting in the queue fail as they do on a plain close().close() without arguments is unchanged: idle connections close immediately and a connection in the middle of a delivery finishes it first.<!-- release-notes:end -->
apply the otp option in MailComposer too
This release adds support for the OTP-Token header from the IETF draft draft-goto-otp-token, which lets mail clients and browsers offer a one-time pas
<!-- release-notes:start -->
This release adds support for the OTP-Token header from the IETF draft draft-goto-otp-token, which lets mail clients and browsers offer a one-time passcode for autofill on the site it belongs to. It also fixes how a Content-ID header is encoded.
OTP-Token header through headers: before this release it went out MIME encoded and could not be parsed.cid that holds a non-ASCII character or a quote.otp message option: otp: { code: '123456', origin: 'https://example.com' } adds OTP-Token: "123456"; origin="https://example.com". The origin is reduced to its canonical form, only https (or http on a loopback host) is accepted, and invalid values fail the send with the new EOTP error code. See Message configuration.OTP-Token header is no longer MIME word encoded. Line breaks and control characters are still removed.OTP-Token is included in the DKIM signature by default.Content-ID header, from an attachment cid or set through headers, is now encoded as a message id rather than as text, so a cid with a non-ASCII character or a quote keeps matching the cid: URL in the HTML.<!-- release-notes:end -->
drop the comments of a Content-Type or Content-Disposition value with the stripComments option
add info.serverMessageId from the final 250 reply
mime-funcs: encode parameter values that look like encoded words
addressparser: read groups in the same pass as the rest of the list
addressparser: handle an address list without copying it per address
addressparser: apply the unexpected "<" rule outside quotes and comments
format References and strip URLs in linear time, release any number of streams
bound the work a message can make the mailer do and keep per-message auth off the transport's token endpoint
fetch: strip credentials on any cross-origin redirect
Pooled connections are closed after 4 minutes without a message (new idleTimeout pool option, set it to 0 to keep them open). A message whose recipien
idleTimeout pool option, set it to 0 to keep them open). A message whose recipients are rejected no longer closes the pooled connection, it is reset with RSET and reused, and a message is requeued when the server dropped a reused connection before any of it was sent.connectionTimeout covers setting the session up as a whole: the DNS lookup, a proxy handshake, the TCP connection, TLS, the greeting and a STARTTLS upgrade. greetingTimeout still bounds the greeting and the STARTTLS handshake within it.421 reply ends the SMTP session. When the server closes an idle connection, SMTPConnection emits only end, not an ECONNECTION error.ESTREAM instead of producing an empty attachment. Content streams of a message that fails are destroyed.opportunisticTLS, authentication is skipped on the unencrypted connection after a failed STARTTLS, unless forceAuth is set.originalCode (the system error code Nodemailer replaced, such as ECONNREFUSED) and, for ETIMEDOUT, timeoutType.addressparser: keep an escaped parenthesis inside a comment
errors: inherit NodemailerError code from ErrnoException (e99db61), closes #1884
addressparser: keep a quoted display name that holds no "@" out of the address
read the advertised SASL methods without backtracking regexes
settle every send on a connection error, back off pool requeues, turn a bare CR into CRLF, bound fetch, honour requireTLS
fetch: report a form body that can not be encoded through the returned stream
derive the attachment filename from the basename of a Windows path
addressparser: bound the '@' probe to the run being scanned
mime-node: clean the boundary where it is written, not only where it is built
mime-funcs: do not double encode Buffer input when chunking base64 mime words
addressparser: scan free text for an address in linear time
addressparser: parse comment-joined addresses in linear time
fetch: scope a cookie without a Path to the RFC 6265 default path
fetch: honor the cookie Domain attribute without accepting public suffixes (1608391), closes #1856
mime-node: flatten nested recipient arrays without recursion
types: accept an explicit undefined for optional properties (209719d), closes #1853
Node.js 20 or newer is required. The Node.js 6 syntax compatibility check and the .npmignore file are gone.
mailer: apply the message access policy in resolveContent
mailer: cap recipients per message with maxRecipients
addressparser: recover the addr-spec from an angle-addr holding whitespace
ci: retrigger the workflows dropped during the Actions outage
mime-funcs: do not let an unpaired surrogate consume the next character
smtp-connection: harden STARTTLS upgrade and secure socket handling
addressparser: keep operator chars inside an address-literal as text
enforce disableFileAccess/disableUrlAccess for raw message option
replace deprecated url.parse with a WHATWG URL wrapper
tls option).apply the transport-level newline option in stream and sendmail transports
fall back to lower-severity handler when custom logger lacks a level method
two pending security advisories (jsonTransport access bypass, List-* CRLF injection)
keep domain as UTF-8 when local part is non-ASCII
restore base64 wrap() trim behavior to prevent trailing CRLF
decode SMTP server responses as UTF-8 at line boundary
sanitize envelope size to prevent SMTP command injection
clean up addressparser and fix group name fallback producing undefined
merge fragmented display names with unquoted commas in addressparser
Error code 'NoAuth' renamed to 'ENOAUTH'
downgrade transient connection error logs to warn level
use 8bit encoding for message/rfc822 attachments
prevent stack overflow DoS in addressparser with deeply nested groups
Increase data URI size limit from 100KB to 50MB and preserve content type
release: Trying to fix release proecess by upgrading Node version in runner
addressparser: Fixed addressparser handling of quoted nested email addresses
ReDoS vulnerability in parseDataURI and _processDataUrl
One column per quarter.