fix: add Date header to email headers RFC822 (#6302)

This commit is contained in:
Miguel Cabrerizo 2023-08-11 11:17:24 +02:00 committed by GitHub
parent 6ca789ad44
commit 4123ab7ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ import (
"fmt"
"regexp"
"strings"
"time"
"github.com/zitadel/zitadel/internal/eventstore"
"github.com/zitadel/zitadel/internal/notification/channels"
@ -37,6 +38,7 @@ func (msg *Email) GetContent() (string, error) {
headers["Return-Path"] = msg.SenderEmail
headers["To"] = strings.Join(msg.Recipients, ", ")
headers["Cc"] = strings.Join(msg.CC, ", ")
headers["Date"] = time.Now().Format(time.RFC1123Z)
message := ""
for k, v := range headers {