From aa724afa4731bb9c33052e2a317a5a1bba69c45f Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Mon, 18 May 2026 12:58:13 -0400 Subject: [PATCH] headerToBytes: encode Reply-To as an address list, not a generic header Closes #147. #132 added address-style encoding for From / To / Cc / Bcc but missed Reply-To. So a Reply-To with utf-8 characters in the display name ended up as a raw '=?UTF-8?Q?...?=' encoding of the whole line including the angle-bracketed address, instead of just the display name. Treat Reply-To the same as the other address headers. Signed-off-by: Charlie Tonneslan --- email.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/email.go b/email.go index 57d1b53..084c2f9 100644 --- a/email.go +++ b/email.go @@ -763,7 +763,7 @@ func headerToBytes(buff io.Writer, header textproto.MIMEHeader) { switch { case field == "Content-Type" || field == "Content-Disposition": buff.Write([]byte(subval)) - case field == "From" || field == "To" || field == "Cc" || field == "Bcc": + case field == "From" || field == "To" || field == "Cc" || field == "Bcc" || field == "Reply-To": participants := strings.Split(subval, ",") for i, v := range participants { addr, err := mail.ParseAddress(v)