diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-07-22 18:54:27 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-07-23 06:40:24 +0000 |
| commit | 4aa75a1288d3ac4aa13407f4ad0fb29ed136955e (patch) | |
| tree | a947fac354d34712cab7ac88c3f3d6255b31a828 | |
| parent | e1dd4f22ed632d9954196b3727a41db69b93ed67 (diff) | |
dashboard: fix In-Reply-To for send_email
For some reason, the default ReplyTo field is converted to a Reply-To
header that's not well understood by the mailing lists.
Set an In-Reply-To header explicitly.
| -rw-r--r-- | dashboard/app/api.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dashboard/app/api.go b/dashboard/app/api.go index cd1a51db7..4a9b03171 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -14,6 +14,7 @@ import ( "io" "math/rand" "net/http" + "net/mail" "net/url" "reflect" "regexp" @@ -1936,9 +1937,13 @@ func apiSendEmail(c context.Context, payload io.Reader) (interface{}, error) { if err := json.NewDecoder(payload).Decode(req); err != nil { return nil, fmt.Errorf("failed to unmarshal request: %w", err) } + var headers mail.Header + if req.InReplyTo != "" { + headers = mail.Header{"In-Reply-To": []string{req.InReplyTo}} + } return nil, sendEmail(c, &aemail.Message{ Sender: req.Sender, - ReplyTo: req.InReplyTo, + Headers: headers, To: req.To, Cc: req.Cc, Subject: req.Subject, |
