From 667e606f7ee0b330baef7a020e59dc4dc68e96db Mon Sep 17 00:00:00 2001 From: Yvonnick Esnault Date: Mon, 11 May 2020 09:58:58 +0200 Subject: [PATCH] fix(api): header date in mail (#5172) close #5171 Signed-off-by: Yvonnick Esnault --- engine/api/mail/mail.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/api/mail/mail.go b/engine/api/mail/mail.go index edc19cbc07..e14fc355d4 100644 --- a/engine/api/mail/mail.go +++ b/engine/api/mail/mail.go @@ -193,6 +193,10 @@ func SendEmail(ctx context.Context, subject string, mailContent *bytes.Buffer, u headers["From"] = smtpFrom headers["To"] = to.String() headers["Subject"] = subject + + // https://tools.ietf.org/html/rfc4021 + headers["Date"] = time.Now().Format(time.RFC1123Z) + // https://tools.ietf.org/html/rfc2392 headers["Message-ID"] = fmt.Sprintf("<%d.%s>", time.Now().UnixNano(), smtpFrom)