diff options
author | Joram Wilander <jwawilander@gmail.com> | 2018-04-12 11:36:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 11:36:56 -0400 |
commit | 191e1ad5563aada1c282e43eb6fa043e317290c8 (patch) | |
tree | 199ea55e303e40e360d8182c2e6e238800f68c24 | |
parent | 1ebf19825bc735424f7278a3c749f83d24ab80f1 (diff) | |
download | chat-191e1ad5563aada1c282e43eb6fa043e317290c8.tar.gz chat-191e1ad5563aada1c282e43eb6fa043e317290c8.tar.bz2 chat-191e1ad5563aada1c282e43eb6fa043e317290c8.zip |
MM-8180 Improve error message for testing smtp connections (#8608)
* Improve error message for testing smtp connections
* Update error message
-rw-r--r-- | app/admin.go | 2 | ||||
-rw-r--r-- | i18n/en.json | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/admin.go b/app/admin.go index 299a8f057..60b71505a 100644 --- a/app/admin.go +++ b/app/admin.go @@ -243,7 +243,7 @@ func (a *App) TestEmail(userId string, cfg *model.Config) *model.AppError { 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 { - return err + return model.NewAppError("testEmail", "app.admin.test_email.failure", map[string]interface{}{"Error": err.Error()}, "", http.StatusInternalServerError) } } diff --git a/i18n/en.json b/i18n/en.json index dec619dec..7abe67567 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -7336,13 +7336,17 @@ }, { "id": "utils.mail.send_mail.from_address.app_error", - "translation": "Notification From Address setting is missing or invalid." + "translation": "Error setting \"From Address\"" }, { "id": "utils.mail.send_mail.msg.app_error", "translation": "Failed to write email message" }, { + "id": "app.admin.test_email.failure", + "translation": "Connection unsuccessful: {{.Error}}" + }, + { "id": "utils.mail.send_mail.msg_data.app_error", "translation": "Failed to add email message data" }, @@ -7352,7 +7356,7 @@ }, { "id": "utils.mail.send_mail.to_address.app_error", - "translation": "Notification To Address setting is missing or invalid." + "translation": "Error setting \"To Address\"" }, { "id": "utils.mail.test.configured.error", |