Move file backend to its own service (#9435)
* Move file backend to its own service * Moving utils/inbucket to mailservice package
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
f1be975d7a
Коммит
a08df883b4
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/services/mailservice"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
@@ -242,7 +243,7 @@ func (a *App) TestEmail(userId string, cfg *model.Config) *model.AppError {
|
||||
} else {
|
||||
T := utils.GetUserTranslations(user.Locale)
|
||||
license := a.License()
|
||||
if err := utils.SendMailUsingConfig(user.Email, T("api.admin.test_email.subject"), T("api.admin.test_email.body"), cfg, license != nil && *license.Features.Compliance); err != nil {
|
||||
if err := mailservice.SendMailUsingConfig(user.Email, T("api.admin.test_email.subject"), T("api.admin.test_email.body"), cfg, license != nil && *license.Features.Compliance); err != nil {
|
||||
return model.NewAppError("testEmail", "app.admin.test_email.failure", map[string]interface{}{"Error": err.Error()}, "", http.StatusInternalServerError)
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user