npm nodemailer 10.1.0
v10.1.0

4 hours ago

10.1.0 (2026-10-10)

Behaviour changes

  • 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 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.
  • Any 421 reply ends the SMTP session. When the server closes an idle connection, SMTPConnection emits only end, not an ECONNECTION error.
  • A content stream that was already read or destroyed fails the message with ESTREAM instead of producing an empty attachment. Content streams of a message that fails are destroyed.
  • With opportunisticTLS, authentication is skipped on the unencrypted connection after a failed STARTTLS, unless forceAuth is set.
  • The envelope is pipelined (MAIL FROM, RCPT TO and DATA in one batch) when the server announces PIPELINING.
  • Errors carry originalCode (the system error code Nodemailer replaced, such as ECONNREFUSED) and, for ETIMEDOUT, timeoutType.

Features

  • harden message streams, SMTP connections and the connection pool (8009da6)

Bug Fixes

  • do not read the environment or the interface table on import (094179d)
  • end the SMTP session on any 421 reply and drive the envelope through one step (5638ac1)
  • keep ERR_ACCESS_DENIED from the Node.js permission model (8b33a3d)
  • let the proxy handshake and the SMTP connection share one deadline (91ed683)
  • mime-node: decode an SMTPUTF8 domain from its A-label form (e436f4d)
  • mime-node: finish an encoded part only after its output was read (ec97d8f)
  • qp: encode a lone CR or LF in binary quoted-printable parts (42b91d9)
  • smtp-connection: count the wait for the greeting against connectionTimeout (bdcd046)
  • smtp-connection: drop the connection when DATA is taken after a refused sender (f90fb04)
  • smtp-connection: refuse a second connect() call (24ba2e0)
  • turn Nagle off for SMTP sockets and report an early sendmail exit as such (fa9b8d3)

Performance Improvements

  • encode base64 and quoted-printable without per-chunk delays (fd377bb)

Don't miss a new nodemailer release

NewReleases is sending notifications on new releases.