[MM-15661] Create SendNotificationEmail and move config option check to it (#11478)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2f9d509284
Коммит
8a13c9d1d5
@@ -179,6 +179,10 @@ func (a *App) TestEmail(userId string, cfg *model.Config) *model.AppError {
|
||||
return model.NewAppError("testEmail", "api.admin.test_email.missing_server", nil, utils.T("api.context.invalid_param.app_error", map[string]interface{}{"Name": "SMTPServer"}), http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if !*cfg.EmailSettings.SendEmailNotifications {
|
||||
return nil
|
||||
}
|
||||
|
||||
// if the user hasn't changed their email settings, fill in the actual SMTP password so that
|
||||
// the user can verify an existing SMTP connection
|
||||
if *cfg.EmailSettings.SMTPPassword == model.FAKE_SETTING {
|
||||
|
||||
Ссылка в новой задаче
Block a user