Skip to content

Commit 981ad21

Browse files
FEATURE (email): Add "to" header to email
1 parent 177a9c7 commit 981ad21

File tree

1 file changed

+2
-1
lines changed
  • backend/internal/features/notifiers/models/email_notifier

1 file changed

+2
-1
lines changed

backend/internal/features/notifiers/models/email_notifier/model.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ func (e *EmailNotifier) Send(logger *slog.Logger, heading string, message string
7676
)
7777
body := message
7878
fromHeader := fmt.Sprintf("From: %s\r\n", from)
79+
toHeader := fmt.Sprintf("To: %s\r\n", e.TargetEmail)
7980

8081
// Combine all parts of the email
81-
emailContent := []byte(fromHeader + subject + mime + body)
82+
emailContent := []byte(fromHeader + toHeader + subject + mime + body)
8283

8384
addr := net.JoinHostPort(e.SMTPHost, fmt.Sprintf("%d", e.SMTPPort))
8485
timeout := DefaultTimeout

0 commit comments

Comments
 (0)