Finished the auth stuff

This commit is contained in:
tidusjar 2016-07-25 14:05:44 +01:00
parent 0e99dc29c9
commit 0cfb6c8b1e
5 changed files with 103 additions and 76 deletions

View file

@ -512,6 +512,13 @@ namespace PlexRequests.UI.Modules
{
return Response.AsJson(valid.SendJsonError());
}
if (settings.Authentication)
{
if (string.IsNullOrEmpty(settings.EmailUsername) || string.IsNullOrEmpty(settings.EmailPassword))
{
return Response.AsJson(new JsonResponseModel {Result = false, Message = "SMTP Authentication is enabled, please specify a username and password"});
}
}
var result = EmailService.SaveSettings(settings);