From 4d2159f35414c73f93922787ab8fabd7f4e6a45e Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 20 May 2022 13:59:29 +0100 Subject: [PATCH] Make 'to' field undefined if empty for consistent validation --- packages/server/src/automations/steps/sendSmtpEmail.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/automations/steps/sendSmtpEmail.js b/packages/server/src/automations/steps/sendSmtpEmail.js index cc28e57b39..71e544a00d 100644 --- a/packages/server/src/automations/steps/sendSmtpEmail.js +++ b/packages/server/src/automations/steps/sendSmtpEmail.js @@ -53,6 +53,7 @@ exports.run = async function ({ inputs }) { if (!contents) { contents = "

No content

" } + to = to || undefined try { let response = await sendSmtpEmail(to, from, subject, contents, true) return {