mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-8180 Improve error message for testing smtp connections (#8608)
* Improve error message for testing smtp connections * Update error message
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7336,12 +7336,16 @@
|
||||
},
|
||||
{
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user