unstale

npm / nodemailer

nodemailer

What changed in nodemailer 7 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

9 breaking33 security4 new APIs and options6 performance5 behavior and defaults1 tooling93 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

nodemailer 1079 changes

Breaking changes 6

  • A stream that was already read or destroyed fails the message with ESTREAM instead of producing an empty attachment, and streams are destroyed when a message fails.

    10.1.0release notes

  • After a failed STARTTLS, authentication is skipped on the unencrypted connection unless forceAuth is set.

    10.1.0release notes

  • Any 421 reply ends the SMTP session; when the server closes an idle connection, SMTPConnection emits only end, not an ECONNECTION error.

    10.1.0release notes

  • Internal members are no longer included in the published declarations.

    10.0.1release notes

  • Node.js 20 or newer is required to run Nodemailer 10.

    10.0.0release notes

  • Hosts that the legacy URL parser would truncate are now refused.

    10.0.0release notes

Security 9

  • Bounds the work a message can make the mailer do.

    10.1.2release notes

  • Credentials are stripped on any cross-origin redirect.

    10.1.1release notes

  • The requireTLS setting is now honored.

    10.0.12release notes

  • Nodemailer: Quoted local-part can produce malformed envelope recipient through RFC 5322 comment parsing

    10.0.9security advisory

  • Nodemailer: Quadratic backtracking in the addressparser free-text fallback allows remote denial of service

    10.0.6security advisory

  • Nodemailer addressparser: O(n^2) on comment-joined addresses enables a remote DoS (reachable via mailparser)

    10.0.5security advisoryrelease notes

  • The fetch behavior now honors the cookie Domain attribute without accepting public suffixes.

    10.0.3release notes

  • Nodemailer: Nested structured recipient arrays bypass the parser depth limit and cause stack exhaustion DoS

    10.0.2security advisory

  • Nodemailer: Process-global DNS cache reuses TLS servername across transports, enabling cross-tenant SMTP credential disclosure

    10.0.2security advisoryrelease notes

New APIs and options 2

  • Adds a pool option that closes pooled connections after 4 minutes without a message; set it to 0 to keep them open.

    10.1.0release notes

  • Nodemailer now provides ES module and CommonJS builds, affecting how applications can import it.

    10.0.0release notes

Performance 4

  • Base64 and quoted-printable are encoded without per-chunk delays.

    10.1.0release notes

  • Unfolding folded DKIM header lines now takes linear time.

    10.0.10release notes

  • Reassembling multiline SMTP replies now takes linear time.

    10.0.10release notes

  • Scans free text for an address in linear time.

    10.0.6release notes

Behavior and default changes 5

  • The timeout covers session setup, including DNS, proxy handshake, TCP, TLS, greeting, and STARTTLS; greetingTimeout still bounds the greeting and STARTTLS handshake within it.

    10.1.0release notes

  • Errors now carry the system error code Nodemailer replaced, such as ECONNREFUSED.

    10.1.0release notes

  • When the server announces PIPELINING, MAIL FROM, RCPT TO, and DATA are sent in one batch.

    10.1.0release notes

  • A message with rejected recipients resets the pooled connection with RSET and reuses it; a message is requeued if the server dropped a reused connection before any of it was sent.

    10.1.0release notes

  • ETIMEDOUT errors now carry timeoutType.

    10.1.0release notes

Tooling 1

  • The @types/nodemailer type layout continues to work with this release.

    10.0.0release notes

Fixes and other changes 52

  • Keeps per-message auth off the transport's token endpoint.

    10.1.2release notes

  • A second connect() call is refused.

    10.1.0release notes

  • An encoded part is finished only after its output has been read.

    10.1.0release notes

  • Preserves ERR_ACCESS_DENIED from the Node.js permission model.

    10.1.0release notes

  • Importing Nodemailer no longer reads the environment or the interface table.

    10.1.0release notes

  • Encodes a lone CR or LF in binary quoted-printable parts.

    10.1.0release notes

  • An early sendmail exit is reported as such.

    10.1.0release notes

  • Nagle is turned off for SMTP sockets.

    10.1.0release notes

  • Decodes an SMTPUTF8 domain from its A-label form.

    10.1.0release notes

  • Escaped parentheses inside comments are now kept during address parsing.

    10.0.16release notes

  • Cookie names retain their case when fetched.

    10.0.16release notes

  • Cookie name-value pairs are read by position.

    10.0.16release notes

  • NodemailerError is compatible with @types/node 26 ErrnoException.

    10.0.15release notes

  • NodemailerError now inherits its code from ErrnoException.

    10.0.15release notes

  • Quoted display names without an @ are kept out of the parsed address.

    10.0.14release notes

  • Header parameters are read and written according to RFC 2045 and RFC 2231.

    10.0.14release notes

  • Reads advertised SASL methods without backtracking regexes.

    10.0.13release notes

  • Strips comments inside an angle-addr before it becomes the address.

    10.0.13release notes

  • A bare CR is turned into CRLF.

    10.0.12release notes

  • Every send is settled on a connection error.

    10.0.12release notes

  • Fetch is bounded.

    10.0.12release notes

  • Pool requeues back off.

    10.0.12release notes

  • The CommonJS entry point and services subpath are compatible with the pre-TypeScript build.

    10.0.11release notes

  • Form-body encoding failures are reported through the returned stream.

    10.0.11release notes

  • A password login fails cleanly when the server offers only XOAUTH2.

    10.0.11release notes

  • The layout of the bundled declarations is restored.

    10.0.11release notes

  • wrap() terminates for short line lengths and a trailing incomplete escape.

    10.0.11release notes

  • Attachment filenames are now derived from the basename of a Windows path.

    10.0.10release notes

  • Bounds the '@' probe to the run being scanned, fixing address parsing.

    10.0.9release notes

  • Keeps text after a comment out of a quoted local part address during parsing.

    10.0.9release notes

  • The boundary is cleaned where it is written, not only where it is built.

    10.0.8release notes

  • Every control character is dropped from multipart boundary material.

    10.0.8release notes

  • Buffer input is no longer double encoded when chunking base64 MIME words.

    10.0.7release notes

  • Line breaks are stripped from multipart boundary material.

    10.0.7release notes

  • A boundary consisting only of line breaks is preserved instead of being stripped to empty.

    10.0.7release notes

  • Rate-limited connections are released when they close.

    10.0.7release notes

  • Cookies without a Path are scoped to the RFC 6265 default path.

    10.0.4release notes

  • Cookies set with Path are sent back only to the exact path.

    10.0.4release notes

  • httpHeaders and tls are preserved for href alternatives and icalEvent.

    10.0.4release notes

  • A configuration error is thrown when the SES client is missing.

    10.0.4release notes

  • Well-known services are resolved by their primary domains.

    10.0.4release notes

  • Nested recipient arrays are flattened without recursion.

    10.0.2release notes

  • Type declarations now accept an explicit undefined for optional properties.

    10.0.1release notes

  • Configuration object keys alongside its url are now applied.

    10.0.0release notes

  • A colon in the user name is preserved when parsing a connection or proxy URL.

    10.0.0release notes

  • Raw messages are canonicalized the way verifiers do, improving DKIM verification compatibility.

    10.0.0release notes

  • Hostnames are resolved when the runtime has no interface table.

    10.0.0release notes

  • An incomplete server reply is no longer stored in lastServerResponse.

    10.0.0release notes

  • The well-known services JSON file remains available at its package path.

    10.0.0release notes

  • Timers are cleared when a connection is dropped before the greeting.

    10.0.0release notes

  • The pool slot is freed if the proxy socket cannot be opened.

    10.0.0release notes

  • A transporter remains assignable to the plain Transporter type.

    10.0.0release notes

nodemailer 937 changes

Breaking changes 1

  • HTTPS requests made while fetching remote content now validate the server's TLS certificate by default; set rejectUnauthorized to false per request to opt out.

    9.0.0release notes

Security 15

  • Message data can no longer reopen the access sandbox.

    9.1.1release notes

  • The message access policy is now applied in resolveContent, so content resolution respects the policy.

    9.1.1release notes

  • Nodemailer: resolveContent() on a MailMessage bypasses disableFileAccess/disableUrlAccess when called with the legacy signature

    9.1.1security advisory

  • Nodemailer: IDN/Punycode domain allow-list bypass leads to email delivery to an attacker-controlled domain

    9.1.0security advisory

  • Nodemailer: Quadratic (O(n²)) time complexity in addressparser allows remote denial of service via a crafted address list

    9.1.0security advisory

  • Nodemailer: Recipient-domain validation bypass via RFC 5322 comment mis-parsing leads to email delivery to an attacker-controlled domain

    9.1.0security advisory

  • Hardens copies of user-supplied keys and URL fetching.

    9.0.6release notes

  • Header key callbacks and DKIM tags can no longer inject content.

    9.0.5release notes

  • Control characters are kept out of header values and msg-id headers.

    9.0.5release notes

  • Hardened STARTTLS upgrades and secure socket handling.

    9.0.3release notes

  • CRLF is rejected in the destination to prevent request injection.

    9.0.2release notes

  • Low-severity issues in smtp-connection were hardened.

    9.0.2release notes

  • SMTP response parsing and socket lifecycle handling were hardened.

    9.0.2release notes

  • Nodemailer: Message-level raw option bypasses disableFileAccess/disableUrlAccess, enabling arbitrary file read and full-response SSRF in the delivered message

    9.0.1security advisory

  • The raw message option now enforces disableFileAccess and disableUrlAccess.

    9.0.1release notes

New APIs and options 1

Performance 1

Fixes and other changes 19

  • A MIME node now inherits the access policy from the tree it belongs to.

    9.1.1release notes

  • Domain encoding now applies UTS-46 mapping.

    9.1.0release notes

  • URL delimiters are kept away from the domain mapper.

    9.1.0release notes

  • Envelope recipient deduplication is linear time, including across address headers.

    9.1.0release notes

  • Address parsing now terminates the domain at an RFC 5322 comment.

    9.1.0release notes

  • Recovers the addr-spec when an angle-addr contains whitespace.

    9.0.6release notes

  • Addresses are normalized so the header and envelope agree.

    9.0.5release notes

  • DEL is encoded in header parameters and List-* comments.

    9.0.5release notes

  • Control characters are kept out of the remaining header positions.

    9.0.5release notes

  • Special characters in List-* header comments are now escaped.

    9.0.5release notes

  • The continuation key is now starred when a parameter line is restarted.

    9.0.5release notes

  • Addresses parsed from strings are now normalized.

    9.0.5release notes

  • Backslashes and quotes in the Content-Type name parameter are escaped.

    9.0.4release notes

  • Unpaired surrogates in header parameter values are percent encoded.

    9.0.4release notes

  • HT, CR, and LF in header parameter values are encoded instead of quoted.

    9.0.4release notes

  • Surrogate pairs remain intact when chunking base64 MIME words.

    9.0.4release notes

  • An unpaired surrogate no longer consumes the next character during MIME processing.

    9.0.4release notes

  • Operator characters inside an address-literal are now kept as text.

    9.0.2release notes

  • Prevents callback double-invocation and hangs on synchronous errors.

    9.0.2release notes

nodemailer 828 changes

Breaking changes 2

  • Strict TLS is enforced for OAuth2 and Ethereal credential requests.

    8.0.8release notes

  • The error code NoAuth was renamed to ENOAUTH, so code checking the old error code must be updated.

    8.0.0release notes

Security 7

  • Ethereal response props are parsed without polynomial regex backtracking.

    8.0.11release notes

  • Nodemailer: CRLF injection in Nodemailer List-* header comments allows arbitrary message header injection

    8.0.9security advisoryrelease notes

  • Nodemailer jsonTransport bypasses disableFileAccess and disableUrlAccess during message normalization

    8.0.9security advisoryrelease notes

  • Nodemailer: Improper TLS Certificate Validation in OAuth2 Token Fetch Enables Credential Interception

    8.0.8security advisory

  • Nodemailer Vulnerable to SMTP Command Injection via CRLF in Transport name Option (EHLO/HELO)

    8.0.5security advisoryrelease notes

  • Nodemailer has SMTP command injection due to unsanitized envelope.size parameter

    8.0.4security advisoryrelease notes

  • DNS fallback is hardened against race conditions and cleanup issues.

    8.0.0release notes

Performance 1

Fixes and other changes 18

  • AWS SES transport errors are now tagged with the ESES code.

    8.0.11release notes

  • The application/ics attachment now includes content supplied through icalEvent path or href.

    8.0.11release notes

  • URL schemes are now stripped from List-ID header values.

    8.0.11release notes

  • The transport-level newline option is now applied in stream and sendmail transports.

    8.0.11release notes

  • For non-pooled SMTP transports, the callback is now resolved at send time.

    8.0.11release notes

  • Falls back to a lower-severity handler when a custom logger lacks a level method.

    8.0.10release notes

  • Four listener and stream leaks in the SMTP transport, connection, and pool are fixed.

    8.0.8release notes

  • Keeps the domain in UTF-8 when the local part is non-ASCII.

    8.0.7release notes

  • Restores base64 wrap() trim behavior to prevent trailing CRLF.

    8.0.6release notes

  • SMTP server responses are decoded as UTF-8 at line boundaries.

    8.0.5release notes

  • Fixes group name fallback producing undefined when parsing addresses.

    8.0.3release notes

  • Fixes cookie bugs.

    8.0.3release notes

  • Merges fragmented display names with unquoted commas when parsing addresses.

    8.0.2release notes

  • Adds Gmail Workspace service configuration.

    8.0.1release notes

  • TLS errors during socket teardown are now absorbed.

    8.0.1release notes

  • Connections now fall back to alternative DNS addresses.

    8.0.0release notes

  • Error codes are centralized and standardized.

    8.0.0release notes

  • Socket cleanup is improved to prevent potential memory leaks.

    8.0.0release notes

nodemailer 77 changes

Security 2

  • Prevents stack overflow denial of service when parsing deeply nested groups.

    7.0.11release notes

  • Nodemailer’s addressparser is vulnerable to DoS caused by recursive calls

    7.0.11security advisory

New APIs and options 1

Fixes and other changes 4

  • Transient connection error logs are downgraded to warn level.

    7.0.13release notes

  • Attachments with the message/rfc822 media type now use 8bit encoding.

    7.0.12release notes

  • Data URI content type is preserved.

    7.0.10release notes

  • The data URI size limit increases from 100KB to 50MB, allowing larger data URIs.

    7.0.10release notes