mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-16 11:53:18 +08:00
Log error when Recipient emailMessage.Recipients is null (#7685)
This commit is contained in:
parent
285857037c
commit
6ea2b8c7f4
@ -57,7 +57,7 @@ namespace Orchard.Email.Services {
|
|||||||
Attachments = (IEnumerable<string>)(parameters.ContainsKey("Attachments") ? parameters["Attachments"] : new List<string>())
|
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");
|
Logger.Error("Email message doesn't have any recipient");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -177,4 +177,4 @@ namespace Orchard.Email.Services {
|
|||||||
return recipients.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
|
return recipients.Split(new[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user