From 28ac78e143a12428e1e9c4bff32c1f77b2811265 Mon Sep 17 00:00:00 2001 From: Dan Head Date: Sun, 5 Mar 2017 12:41:00 +0000 Subject: [PATCH] Don't send email when address doesn't exist --- src/core/emailer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/emailer.js b/src/core/emailer.js index d4ec346..801f34a 100644 --- a/src/core/emailer.js +++ b/src/core/emailer.js @@ -38,7 +38,7 @@ ${person.attending && person.dietary.length > 0 ? `

Your dietary requirements export const sendRSVPEmail = function sendRSVPEmail(person) { Settings.findAll().then(data => { - if (data[0].email) { + if (data[0].email && person.email) { const mailOptions = { from: `"${email.senderName}" <${email.senderAddress}>`, to: person.email,