Commit Graph
1 Commits
Author SHA1 Message Date
fbf6510dd8 fix: join Reply-To addresses as string for SMTP compatibility (#28611)
* fix: join multiple Reply-To addresses as comma-separated string

Some SMTP providers (e.g., SendLayer) reject emails when Reply-To is
passed as an array to nodemailer, which serializes it as multiple
Reply-To headers. Using a comma-joined string is RFC 2822 compliant
and works universally across all SMTP providers.

Fixes #28610

* test: add unit tests for getReplyToHeader SMTP compatibility

- Verify replyTo is always returned as comma-separated string, not array
- Test single email, multiple emails, and empty email cases
- Add RFC 5322 compliance test for SMTP compatibility

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* docs: add RFC 5322 reference comment to getReplyToHeader tests

Co-Authored-By: Claude Opus 4.5 <[email protected]>

---------

Co-authored-by: Lawrence Christian <[email protected]>
Co-authored-by: Romit <[email protected]>
Co-authored-by: Romit <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-03-28 13:08:52 +00:00