Skip to content

v5.3.0: transport verify timeouts, reported outcome-write failures, Node 14 support - #67

Merged
dr-dimitru merged 28 commits into
masterfrom
next-5.3
Sep 30, 2026
Merged

dr-dimitru merged 28 commits into
masterfrom
next-5.3

Conversation

@dr-dimitru

@dr-dimitru dr-dimitru commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

  • ✨ Transport verification gets a verifyTimeout (default 30 s). A timeout no longer marks a transport unusable, late verdicts still apply, and quarantined transports recover through background re-probes with backoff (60 s doubling to 15 min).
  • 🔧 A failed send-outcome write is no longer silent. drain() resolves { failedWrites }, and onError fires with details.phase 'complete' or 'checkpoint'. An outcome write lost after an uncertain claim renewal is retried once, then reported.
  • 🔧 In recipient-policy mode, a throwing claim-renewal write stops renewals but keeps the outcome write. Before, the row stayed sending and was re-sent later with no error.
  • ⚠️ engines.node is now >=14.19.3 (was >=20.9.0). The packed tarball passes the runtime matrix on Node 14.19.3 through 24 and Bun.
  • 🔧 Recipient policies accept quoted display names such as "Doe, John" <user@example.com>. This includes the 5.2.2 changes from v5.2.2: accept quoted display names under recipient policies #64, which were not published separately.
  • ✨ Recipient policies auto-quote display names with unquoted @ [ ] \ ( ), so every address 5.2.1 accepted still works. The sent header shows the name quoted ("John (Sales)" <x@y.com>) and always matches the envelope address. Before, Nodemailer dropped comments from the header, or the whole mailbox after an unbalanced (. Without recipientPolicies nothing changes.
  • 📦 josk raised to ^6.5.0. It declares Node >=14.21.3, so engine-strict installs fail on Node 14.19.3 to 14.21.2.
  • 📔 AGENTS.md lists known Jest testing traps.

Breaking effects to check: code relying on drain() resolving undefined, or on verify timeouts marking a transport down. Migration notes are in CHANGELOG.md.

Verification

  • npm run test:jest: 540 passed, 19 suites, 97.32% statements.
  • bun test ./test/jest: 540 passed, 19 files.
  • Auto-quoting smoke test on Node 14.19.3 (index.cjs load, header rewrite, address parse): passed.
  • npm run test:types: passed.
  • npm run prepublishOnly: no diff in generated files.
  • Mocha integration, Meteor tests, and the Node 14 runtime matrix with josk 6.5.0: not run locally (no Redis, Mongo, Postgres or Docker). CI runs the first two and the Node 14.19.3, 16 and 18 packed-artifact jobs.

josk 6.5.0 lowers its engines floor to Node 14.21.3, so engine-strict
installs now fail only on Node 14.19.3 to 14.21.2.
5.2.2 rejected unquoted @ [ ] \ ( ) in display names, which 5.2.1
accepted. Sending the raw string also let Nodemailer drop comments
from the To header, or the whole mailbox after an unbalanced "(",
while RCPT still went to the address. Quoting the name in the sent
header keeps 5.2.1 inputs working and makes the header show the
mailbox the policy checked. Stored mailOptions keep the original.
@dr-dimitru
dr-dimitru merged commit 9364ff4 into master Sep 30, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant