Don't send email when address doesn't exist
This commit is contained in:
@@ -38,7 +38,7 @@ ${person.attending && person.dietary.length > 0 ? `<p>Your dietary requirements
|
|||||||
|
|
||||||
export const sendRSVPEmail = function sendRSVPEmail(person) {
|
export const sendRSVPEmail = function sendRSVPEmail(person) {
|
||||||
Settings.findAll().then(data => {
|
Settings.findAll().then(data => {
|
||||||
if (data[0].email) {
|
if (data[0].email && person.email) {
|
||||||
const mailOptions = {
|
const mailOptions = {
|
||||||
from: `"${email.senderName}" <${email.senderAddress}>`,
|
from: `"${email.senderName}" <${email.senderAddress}>`,
|
||||||
to: person.email,
|
to: person.email,
|
||||||
|
|||||||
Reference in New Issue
Block a user