feat: v2(Incomplete,very early version)

This commit is contained in:
mei
2026-04-05 10:36:22 +08:00
parent 2ab9e060eb
commit 6190a8853a
41 changed files with 1131 additions and 766 deletions
+20
View File
@@ -0,0 +1,20 @@
package email
import (
"log"
"github.com/ssdomei232/goodBaby/model"
)
// 向邮件列表发送消息
func SendMail(rule *model.Rule) {
emailRule, err := GetEmailRuleFromRule(rule)
if err != nil {
log.Printf("获取邮件规则配置失败: %v", err)
return
}
for _, destinations := range emailRule.Destinations {
go sendMailMsgWithRetry(rule, destinations) // 使用 goroutine 发送邮件,避免指数退避阻塞其他地址
}
}