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

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

@@ -214,7 +214,7 @@ func SendMailUsingConfig(to, subject, htmlBody string, config *model.Config, ena
// allows for sending an email with attachments and differing MIME/SMTP recipients
func SendMailUsingConfigAdvanced(mimeTo, smtpTo string, from, replyTo mail.Address, subject, htmlBody string, attachments []*model.FileInfo, mimeHeaders map[string]string, config *model.Config, enableComplianceFeatures bool) *model.AppError {
if !*config.EmailSettings.SendEmailNotifications || len(*config.EmailSettings.SMTPServer) == 0 {
if len(*config.EmailSettings.SMTPServer) == 0 {
return nil
}