From 0b3e3473e74f378b0a22b3e50dfba7b2ced42a18 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 16 Sep 2016 15:37:53 -0400 Subject: [PATCH] update email config --- .../Configuration/config.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Plugins.SmtpNotifications/Configuration/config.html b/MediaBrowser.Plugins.SmtpNotifications/Configuration/config.html index f8b5529..181960a 100644 --- a/MediaBrowser.Plugins.SmtpNotifications/Configuration/config.html +++ b/MediaBrowser.Plugins.SmtpNotifications/Configuration/config.html @@ -87,19 +87,26 @@ Dashboard.showLoadingMsg(); + var onError = function () { + require(['alert'], function (alert) { + alert("There was an error sending the test email. Please check your email settings and try again."); + }); + }; + ApiClient.getPluginConfiguration(pluginId).then(function (config) { - config.Options.filter(function (c) { + config.Options.map(function (c) { ApiClient.ajax({ type: "POST", url: ApiClient.getUrl("Notification/SMTP/Test/" + c.MediaBrowserUserId) - }).then(function () { - Dashboard.hideLoadingMsg(); - }); + }).catch(onError); }); - }); + + Dashboard.hideLoadingMsg(); + + }, onError); }); function loadUserConfig(page, userId) {