From 8bec5ef7d4e46b9e6ecb1e8cdc13d106b5383726 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Mon, 15 Apr 2024 20:47:53 +0200 Subject: [PATCH] also trigger use of smtputf8 for utf8 localpart in Reply-To header --- webmail/api.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webmail/api.go b/webmail/api.go index 10fd0a7..3f07fb1 100644 --- a/webmail/api.go +++ b/webmail/api.go @@ -378,6 +378,9 @@ func (w Webmail) MessageSubmit(ctx context.Context, m SubmitMessage) { // todo: may want to warn user that they should consider sending with a ascii-only localpart, in case receiver doesn't support smtputf8. smtputf8 = true } + if !smtputf8 && replyTo != nil && replyTo.Address.Localpart.IsInternational() { + smtputf8 = true + } // Create file to compose message into. dataFile, err := store.CreateMessageTemp(log, "webmail-submit")