diff --git a/Utility/Communications/CommsTransmitterMail.cs b/Utility/Communications/CommsTransmitterMail.cs index daeadca7..438562ec 100644 --- a/Utility/Communications/CommsTransmitterMail.cs +++ b/Utility/Communications/CommsTransmitterMail.cs @@ -54,7 +54,7 @@ namespace Swarmops.Utility.Communications string mailBodyText = (string)comm[CommRenderPart.BodyText]; mailBodyText = mailBodyText.Replace("[Addressee]", person.Canonical); - string mailBodyHtml = (string)comm[CommRenderPart.BodyHtml]; + string mailBodyHtml = comm.ContainsKey(CommRenderPart.BodyHtml)? (string)comm[CommRenderPart.BodyHtml]: string.Empty; mailBodyHtml = mailBodyHtml.Replace("[Addressee]", person.Canonical); mail.Subject = (string)comm[CommRenderPart.Subject];