Skip to content

Commit

Permalink
fix(api): header date in mail (#5172)
Browse files Browse the repository at this point in the history
close #5171

Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored May 11, 2020
1 parent f336f5c commit 667e606
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/api/mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 667e606

Please sign in to comment.