fix: improve error handling for email sending failures

This commit is contained in:
CaIon
2025-10-13 19:21:26 +08:00
parent 18b945b9c5
commit 5fc9152499

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
}