Skip to content

Commit

Permalink
Merge pull request #649 from tidusjar/Hotfix
Browse files Browse the repository at this point in the history
potential fix for #629
  • Loading branch information
tidusjar authored Nov 2, 2016
2 parents 86f1074 + 3b357c9 commit 4f92676
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions PlexRequests.Services/Jobs/RecentlyAdded.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,17 @@ private void Send(NewletterSettings newletterSettings, string html, PlexSettings
if (newletterSettings.SendToPlexUsers)
{
var users = Api.GetUsers(plexSettings.PlexAuthToken);
foreach (var user in users.User)
if (users != null)
{
message.Bcc.Add(new MailboxAddress(user.Username, user.Email));
foreach (var user in users.User)
{
message.Bcc.Add(new MailboxAddress(user.Username, user.Email));
}
}
}

if (newletterSettings.CustomUsersEmailAddresses.Any())
if (newletterSettings.CustomUsersEmailAddresses != null
&& newletterSettings.CustomUsersEmailAddresses.Any())
{
foreach (var user in newletterSettings.CustomUsersEmailAddresses)
{
Expand Down

0 comments on commit 4f92676

Please sign in to comment.