PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
REFACTOR (email): Refactor commit adding date headers to emails
Rostislav Dugin744e51d1e199
diff --git a/backend/internal/features/email/email.go b/backend/internal/features/email/email.goindex 9691c9ae..72ca2ff0 100644--- a/backend/internal/features/email/email.go+++ b/backend/internal/features/email/email.go@@ -52,10 +52,7 @@ func (s *EmailSMTPSender) buildEmailContent(to, subject, body, from string) []by// Encode Subject header using RFC 2047 to avoid SMTPUTF8 requirementencodedSubject := encodeRFC2047(subject)subjectHeader := fmt.Sprintf("Subject: %s\r\n", encodedSubject)- // Get the current time- now := time.Now()- // Generate Date header that is compliant with RFC 5322 using the format from RFC 1123Z- dateHeader := fmt.Sprintf("Date: %s\r\n", now.Format(time.RFC1123Z))+ dateHeader := fmt.Sprintf("Date: %s\r\n", time.Now().UTC().Format(time.RFC1123Z))mimeHeaders := fmt.Sprintf("MIME-version: 1.0;\nContent-Type: %s; charset=\"%s\";\n\n",diff --git a/backend/internal/features/notifiers/models/email_notifier/model.go b/backend/internal/features/notifiers/models/email_notifier/model.goindex c6eca038..5d0b2dc9 100644--- a/backend/internal/features/notifiers/models/email_notifier/model.go+++ b/backend/internal/features/notifiers/models/email_notifier/model.go@@ -130,10 +130,7 @@ func (e *EmailNotifier) buildEmailContent(heading, message, from string) []byte// This ensures compatibility with SMTP servers that don't support SMTPUTF8encodedSubject := encodeRFC2047(heading)subject := fmt.Sprintf("Subject: %s\r\n", encodedSubject)- // Get the current time- now := time.Now()- // Generate Date header that is compliant with RFC 5322 using the format from RFC 1123Z- dateHeader := fmt.Sprintf("Date: %s\r\n", now.Format(time.RFC1123Z))+ dateHeader := fmt.Sprintf("Date: %s\r\n", time.Now().UTC().Format(time.RFC1123Z))mimeHeaders := fmt.Sprintf("MIME-version: 1.0;\nContent-Type: %s; charset=\"%s\";\n\n",