Skip to content

Commit 667e606

Browse files
authored
fix(api): header date in mail (#5172)
close #5171 Signed-off-by: Yvonnick Esnault <[email protected]>
1 parent f336f5c commit 667e606

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

engine/api/mail/mail.go

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ func SendEmail(ctx context.Context, subject string, mailContent *bytes.Buffer, u
193193
headers["From"] = smtpFrom
194194
headers["To"] = to.String()
195195
headers["Subject"] = subject
196+
197+
// https://tools.ietf.org/html/rfc4021
198+
headers["Date"] = time.Now().Format(time.RFC1123Z)
199+
196200
// https://tools.ietf.org/html/rfc2392
197201
headers["Message-ID"] = fmt.Sprintf("<%d.%s>", time.Now().UnixNano(), smtpFrom)
198202

0 commit comments

Comments
 (0)