Packages

nodemailer

10.6.0 · 15 Nov 2026MIT-040.3M / weekRepositoryHomepagenpmAtom feed

Upgrading nodemailer From 7.0.13 to 10.6.0

54 releases in betweenevery note read

Other targets from 7.0.13Clears its 20 advisories10.1.4
  1. 7.0.13yours
  2. 8.0.0major
  3. 3 releases
  4. 8.0.4security
  5. 8.0.5security
  6. 3 releases
  7. 8.0.9security
  8. 2 releases
  9. 9.0.0major
  10. 8 releases
  11. 10.0.0major
  12. 29 releases
  13. 10.4.1security
  14. 1 release
  15. 10.6.0target

Before you upgrade

Tick each one off as you go
  • Breaking10.2.1
  • Breaking10.0.0
  • Breaking9.0.0
  • Breaking8.0.0

Security

Fixes 20 advisories affecting 7.0.13

  • A security patch release.

    10.4.1
  • Two pending security advisories (jsonTransport access bypass, List-* CRLF injection)

    8.0.9
  • Sanitize CRLF in transport name option to prevent SMTP command injection (GHSA-vvjj-xcjg-gr5g)

    8.0.5
  • Sanitize envelope size to prevent SMTP command injection

    8.0.4

Release by release

  1. 10.6.0

    15 Nov 20261 new · 2 fixes
    • New

      smtp: add configurable socketCloseTimeout (#1916) (7f04d0b), closes #1915

    • Fixed

      Let Set-Cookie Max-Age take precedence over Expires

    • Fixed

      smtp-connection: close the TLS socket of an upgraded connection on Node 27

  2. 10.5.0

    10 Nov 20265 new · 2 fixes
    • New

      AbortSignal per send: 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.

    • New

      DKIM: the d= domain is encoded with UTS-46 mapping, the same way as the address headers.

    • New

      Header encoding: plain text that a receiver would decode as an encoded-word without it being a valid one (such as =?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.

    • New

      SMTP connection: a supplied socket no longer connects, and TLS no longer starts, after the connection was closed.

    • New

      smtp: support AbortSignal for individual sends (#1911) (66387ed), closes #1910

    • Fixed

      dkim: encode the d= domain the same way as the address headers

    • Fixed

      mime-funcs: encode header text that would be decoded as an invalid encoded word

  3. 10.4.1

    Security fix10 Nov 20263 new · 2 fixes
    • Security

      A security patch release.

    • New

      Recipient domains with internationalized characters are mapped the same way 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.

    • New

      Address parsing: whitespace or a comment around a dot in a domain is read the way RFC 5322 parsers read it, as part of one domain. Previously the domain ended there and the rest moved into the display name.

    • New

      Well-known services: service: 'SpacePost' (smtp.spacepost.dev, port 25976, STARTTLS required).

    • Fixed

      addressparser: read whitespace and comments around a dot of the domain as CFWS

    • Fixed

      mime-node: hand a domain to the UTS-46 mapper without lowercasing it first

  4. 10.4.0

    7 Nov 20263 new
    • New

      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().

    • New

      close() without arguments is unchanged: idle connections close immediately and a connection in the middle of a delivery finishes it first.

    • New

      Let close({ force: true }) end pooled connections that are delivering a message

  5. 10.3.1

    29 Oct 20261 fix
    • Fixed

      Apply the otp option in MailComposer too

  6. 10.3.0

    29 Oct 20266 new · 1 fix
    • New

      New 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.

    • New

      A custom OTP-Token header is no longer MIME word encoded. Line breaks and control characters are still removed.

    • New

      OTP-Token is included in the DKIM signature by default.

    • New

      A 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.

    • New

      Groundmail added to the well-known services.

    • New

      Add the otp option for the OTP-Token header

    • Fixed

      Encode a Content-ID header as a message id

  7. 10.2.1

    Migration needed22 Oct 2026
    • Breaking

      Drop the comments of a Content-Type or Content-Disposition value with the stripComments option

  8. 10.2.0

    21 Oct 20264 new · 2 fixes
    • New

      Add info.serverMessageId from the final 250 reply

    • New

      Add pendingCount() to the SMTP pool

    • New

      Make header value encoding public with MimeNode encodeHeaderValue()

    • New

      Mark SMTP errors as permanent or transient with err.permanent

    • Fixed

      Label an ASCII message/rfc822 attachment 7bit instead of 8bit

    • Fixed

      Report the recipients an LMTP server refuses after DATA in rejectedErrors

6 other lines we could not sort, mostly version bumps
  • Anyone who signs with DKIM for a domain written with upper case or mapped non-ASCII characters (an upper case IDN label, or one holding a soft hyphen). The d= tag named a different domain than From:, so verification and DMARC alignment failed.

    10.5.0
  • Anyone who wants to cancel or time-limit a single send without closing the transport or pool.

    10.5.0
  • Everyone who passes user-supplied recipient addresses to Nodemailer, especially applications that restrict recipients by domain. Both fixes close a gap between the domain a validator reads and the domain in the SMTP envelope.

    10.4.1
  • Anyone sending one-time passcodes by email who wants them to be machine-readable.

    10.3.0
  • Anyone already setting an OTP-Token header through headers: before this release it went out MIME encoded and could not be parsed.

    10.3.0
  • Anyone embedding images with a cid that holds a non-ASCII character or a quote.

    10.3.0

1 internal line (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.