fix: 多地区outlook邮箱和ofb邮箱Auth

This commit is contained in:
OswinWu
2024-08-23 17:16:09 +08:00
parent 7c4d9d225e
commit 484a8595e4
2 changed files with 9 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ func SendEmail(subject string, receiver string, content string) error {
if err != nil {
return err
}
} else if strings.HasSuffix(SMTPAccount, "outlook.com") {
} else if isOutlookServer(SMTPAccount) {
auth = LoginAuth(SMTPAccount, SMTPToken)
err = smtp.SendMail(addr, auth, SMTPAccount, to, mail)
} else {