From f6bf150d2130dbbea0333015b30f1d5f9cdd17f6 Mon Sep 17 00:00:00 2001 From: CaIon Date: Mon, 13 Oct 2025 19:21:26 +0800 Subject: [PATCH] fix: improve error handling for email sending failures --- common/email.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/email.go b/common/email.go index 18e6dbf7..e27d8bcd 100644 --- a/common/email.go +++ b/common/email.go @@ -86,5 +86,8 @@ func SendEmail(subject string, receiver string, content string) error { } else { err = smtp.SendMail(addr, auth, SMTPFrom, to, mail) } + if err != nil { + SysError(fmt.Sprintf("failed to send email to %s: %v", receiver, err)) + } return err }