[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 удалений

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

@@ -104,7 +104,7 @@ func (a *App) sendNotificationEmail(notification *postNotification, user *model.
var bodyText = a.getNotificationEmailBody(user, post, channel, channelName, senderName, team.Name, teamURL, emailNotificationContentsType, useMilitaryTime, translateFunc)
a.Srv.Go(func() {
if err := a.SendMail(user.Email, html.UnescapeString(subjectText), bodyText); err != nil {
if err := a.SendNotificationMail(user.Email, html.UnescapeString(subjectText), bodyText); err != nil {
mlog.Error(fmt.Sprint("Error to send the email", user.Email, err))
}
})