From 09cdb351f26698dcc22c8c46154b4e55ecd53293 Mon Sep 17 00:00:00 2001 From: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:05:33 -0600 Subject: [PATCH] fix: dont attempt to send email to no users (#4352) --- api/src/services/email.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/src/services/email.service.ts b/api/src/services/email.service.ts index 568d557943..9811de57c0 100644 --- a/api/src/services/email.service.ts +++ b/api/src/services/email.service.ts @@ -106,6 +106,7 @@ export class EmailService { attachment?: EmailAttachmentData, ) { const isMultipleRecipients = Array.isArray(to); + if (isMultipleRecipients && to.length === 0) return; const emailParams: MailDataRequired = { to, from,