fix: improve error handling for email sending failures

This commit is contained in:
CaIon
2025-10-13 19:21:26 +08:00
parent 5e1d7ab3b9
commit f6bf150d21

View File

@@ -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
}