refactor: add email notify record

This commit is contained in:
ning 2025-07-17 11:45:58 +08:00
parent 67d2875690
commit 96629e284f
1 changed files with 5 additions and 1 deletions

View File

@ -502,7 +502,11 @@ func (ncc *NotifyChannelCacheType) startEmailSender(chID int64, smtp *models.SMT
m.Mail.GetHeader("Subject"), m.Mail.GetHeader("To")) m.Mail.GetHeader("Subject"), m.Mail.GetHeader("To"))
} }
// sender.NotifyRecord(ncc.ctx, m.Events, m.NotifyRuleId, models.Email, strings.Join(m.Mail.GetHeader("To"), ","), "", err) // 记录通知详情
if ncc.notifyRecordFunc != nil {
target := strings.Join(m.Mail.GetHeader("To"), ",")
ncc.notifyRecordFunc(ncc.ctx, m.Events, m.NotifyRuleId, "Email", target, "success", err)
}
size++ size++
if size >= conf.Batch { if size >= conf.Batch {