diff options
| author | 2025-04-06 14:55:35 +0200 | |
|---|---|---|
| committer | 2025-04-06 14:55:35 +0200 | |
| commit | e263d236223defbbdf9762cca57720da1d77c3ca (patch) | |
| tree | 5c7f890c9c7aef2addd8270d3b255c3fe6075cbf /internal/email/common.go | |
| parent | [chore] Migrate accounts to new table, relax uniqueness constraint of actor `... (diff) | |
| download | gotosocial-e263d236223defbbdf9762cca57720da1d77c3ca.tar.xz | |
[bugfix] Change email `Date` header to use RFC2822 (#3972)
Diffstat (limited to 'internal/email/common.go')
| -rw-r--r-- | internal/email/common.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/email/common.go b/internal/email/common.go index 25a469a39..68e3b429b 100644 --- a/internal/email/common.go +++ b/internal/email/common.go @@ -31,6 +31,7 @@ import ( "github.com/google/uuid" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/gtserror" + "github.com/superseriousbusiness/gotosocial/internal/util" ) func (s *sender) sendTemplate(template string, subject string, data any, toAddresses ...string) error { @@ -105,7 +106,7 @@ func assembleMessage(mailSubject string, mailBody string, mailFrom string, msgID // msg headers.' msg.WriteString("To: Undisclosed Recipients:;" + CRLF) } - msg.WriteString("Date: " + time.Now().Format(time.RFC822Z) + CRLF) + msg.WriteString("Date: " + util.FormatRFC2822(time.Now()) + CRLF) msg.WriteString("From: " + mailFrom + CRLF) msg.WriteString("Message-ID: <" + uuid.New().String() + "@" + msgIDHost + ">" + CRLF) msg.WriteString("Subject: " + mailSubject + CRLF) |
