Skip to content

Commit

Permalink
Log error when Recipient emailMessage.Recipients is null (OrchardCMS#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jardg authored and sebastienros committed May 12, 2017
1 parent 2858570 commit 6ea2b8c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void Process(IDictionary<string, object> parameters) {
Attachments = (IEnumerable<string>)(parameters.ContainsKey("Attachments") ? parameters["Attachments"] : new List<string>())
};

if (emailMessage.Recipients.Length == 0) {
if (string.IsNullOrWhiteSpace(emailMessage.Recipients)) {
Logger.Error("Email message doesn't have any recipient");
return;
}
Expand Down Expand Up @@ -177,4 +177,4 @@ private IEnumerable<string> ParseRecipients(string recipients) {
return recipients.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
}
}
}
}

0 comments on commit 6ea2b8c

Please sign in to comment.