mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed #240
This commit is contained in:
parent
c43e3a93d2
commit
573ad84fd8
1 changed files with 12 additions and 5 deletions
|
@ -62,7 +62,10 @@ namespace PlexRequests.Services.Notification
|
|||
|
||||
var emailSettings = (EmailNotificationSettings)settings;
|
||||
|
||||
if (!ValidateConfiguration(emailSettings)) return;
|
||||
if (!ValidateConfiguration(emailSettings))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (model.NotificationType)
|
||||
{
|
||||
|
@ -96,15 +99,19 @@ namespace PlexRequests.Services.Notification
|
|||
|
||||
private bool ValidateConfiguration(EmailNotificationSettings settings)
|
||||
{
|
||||
if (!settings.Enabled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (string.IsNullOrEmpty(settings.EmailHost) || string.IsNullOrEmpty(settings.EmailUsername) || string.IsNullOrEmpty(settings.EmailPassword) || string.IsNullOrEmpty(settings.RecipientEmail) || string.IsNullOrEmpty(settings.EmailPort.ToString()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!settings.EnableUserEmailNotifications)
|
||||
{
|
||||
if (!settings.Enabled)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue