|
|
|
@ -642,9 +642,11 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
|
await NotificationService.Publish(notificationModel, settings);
|
|
|
|
|
Log.Info("Sent email notification test");
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Log.Error("Failed to subscribe and publish test Email Notification");
|
|
|
|
|
var msg = "Failed: " + ex.Message;
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = msg });
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
@ -653,7 +655,9 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
|
NotificationService.UnSubscribe(new EmailMessageNotification(EmailService));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = true, Message = "Successfully sent a test Email Notification!" });
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Response SaveEmailNotifications()
|
|
|
|
@ -1299,7 +1303,8 @@ namespace Ombi.UI.Modules.Admin
|
|
|
|
|
{
|
|
|
|
|
var settings = this.Bind<MassEmailSettings>();
|
|
|
|
|
Log.Debug("Clicked Admin Mass Email Test");
|
|
|
|
|
if (settings.Subject == null) {
|
|
|
|
|
if (settings.Subject == null)
|
|
|
|
|
{
|
|
|
|
|
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Please Set a Subject" });
|
|
|
|
|
}
|
|
|
|
|
if (settings.Body == null)
|
|
|
|
|