From f76bdd26560f5189f5452916743c0d6da6c5236f Mon Sep 17 00:00:00 2001 From: Harry Culpan Date: Sat, 4 Jul 2026 21:50:21 -0400 Subject: [PATCH] Fix Send Reminder emailing only sender, not players SendEmail never read Email.BccAddress, so the player recipients attached as Bcc were silently dropped from the SMTP envelope and only the hardcoded To address (the sender) ever received the mail. Co-Authored-By: Claude Sonnet 5 --- pkg/email/send.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/email/send.go b/pkg/email/send.go index edcc518..584031d 100644 --- a/pkg/email/send.go +++ b/pkg/email/send.go @@ -12,10 +12,10 @@ func SendEmail(email *Email) error { return err } - return sendEmail(config.Username, config.Password, config.SmtpServer, int(SMTP_SERVICE), email.ToAddress, email.Subject, email.Body) + return sendEmail(config.Username, config.Password, config.SmtpServer, int(SMTP_SERVICE), email.ToAddress, email.BccAddress, email.Subject, email.Body) } -func sendEmail(username, password, server string, port int, to []string, subject, body string) error { +func sendEmail(username, password, server string, port int, to []string, bcc []string, subject, body string) error { auth := smtp.PlainAuth("", username, password, server) msg := "From: " + username + "\r\n" + @@ -24,7 +24,9 @@ func sendEmail(username, password, server string, port int, to []string, subject "\r\n" + body - err := smtp.SendMail(server+":"+strconv.Itoa(port), auth, username, to, []byte(msg)) + recipients := append(append([]string{}, to...), bcc...) + + err := smtp.SendMail(server+":"+strconv.Itoa(port), auth, username, recipients, []byte(msg)) if err != nil { return err }