Added a safety check for empty mail addys
This commit is contained in:
@@ -37,6 +37,11 @@ namespace Swarmops.Utility.Communications
|
||||
|
||||
// This is a rather simple mail (no images or stuff like that)
|
||||
|
||||
if (string.IsNullOrWhiteSpace (person.Mail))
|
||||
{
|
||||
throw new OutboundCommTransmitException("No valid mail address for " + person.Canonical);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
mail.From = new MailAddress ((string) comm[CommRenderPart.SenderMail], (string) comm[CommRenderPart.SenderName],
|
||||
|
||||
Reference in New Issue
Block a user