mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-18 05:47:28 +00:00
fix: improve error handling for email sending failures
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user