From 7460372faf8cb20fb402885e012bb164dd63fd6c Mon Sep 17 00:00:00 2001 From: ychung-mot Date: Tue, 22 Oct 2024 11:33:01 -0700 Subject: [PATCH] fix: remove empty email addresses --- server/StrDss.Service/EmailTemplates/EmailTemplateBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/StrDss.Service/EmailTemplates/EmailTemplateBase.cs b/server/StrDss.Service/EmailTemplates/EmailTemplateBase.cs index 0876ce28..8344e9b3 100644 --- a/server/StrDss.Service/EmailTemplates/EmailTemplateBase.cs +++ b/server/StrDss.Service/EmailTemplates/EmailTemplateBase.cs @@ -48,9 +48,9 @@ public async Task SendEmail() Body = GetContent(), From = From, Subject = Subject, - To = To, - Cc = Cc, - Bcc = Bcc, + To = To.Where(email => !string.IsNullOrWhiteSpace(email)).ToList(), + Cc = Cc.Where(email => !string.IsNullOrWhiteSpace(email)).ToList(), + Bcc = Bcc.Where(email => !string.IsNullOrWhiteSpace(email)).ToList(), Info = Info, Attachments = Attachments, };