Skip to content

Commit 96629e2

Browse files
committed
refactor: add email notify record
1 parent 67d2875 commit 96629e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

memsto/notify_channel_cache.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,11 @@ func (ncc *NotifyChannelCacheType) startEmailSender(chID int64, smtp *models.SMT
502502
m.Mail.GetHeader("Subject"), m.Mail.GetHeader("To"))
503503
}
504504

505-
// sender.NotifyRecord(ncc.ctx, m.Events, m.NotifyRuleId, models.Email, strings.Join(m.Mail.GetHeader("To"), ","), "", err)
505+
// 记录通知详情
506+
if ncc.notifyRecordFunc != nil {
507+
target := strings.Join(m.Mail.GetHeader("To"), ",")
508+
ncc.notifyRecordFunc(ncc.ctx, m.Events, m.NotifyRuleId, "Email", target, "success", err)
509+
}
506510
size++
507511

508512
if size >= conf.Batch {

0 commit comments

Comments
 (0)