[MM-15661] Create SendNotificationEmail and move config option check to it (#11478)

Этот коммит содержится в:
Miguel de la Cruz
2019-07-04 14:16:41 +01:00
коммит произвёл GitHub
родитель 2f9d509284
Коммит 8a13c9d1d5
6 изменённых файлов: 26 добавлений и 20 удалений

Просмотреть файл

@@ -240,7 +240,7 @@ func (s *Server) sendBatchedEmailNotification(userId string, notifications []*ba
body.Props["Posts"] = template.HTML(contents)
body.Props["BodyText"] = translateFunc("api.email_batching.send_batched_email_notification.body_text", len(notifications))
if err := s.FakeApp().SendMail(user.Email, subject, body.Render()); err != nil {
if err := s.FakeApp().SendNotificationMail(user.Email, subject, body.Render()); err != nil {
mlog.Warn(fmt.Sprintf("Unable to send batched email notification err=%v", err), mlog.String("email", user.Email))
}
}