From fd1ef94df38707f5c21baf914ca0f081057631f4 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Oct 2023 15:02:50 +0000 Subject: [PATCH] Use array of emails for to destination --- src/config/params.json | 9 ++++++++- src/subscribers/emailSubscriber.js | 6 +----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/config/params.json b/src/config/params.json index 2507702..f83dcec 100644 --- a/src/config/params.json +++ b/src/config/params.json @@ -1,6 +1,13 @@ { "sendgrid": { - "to": "onja@blastream.com", + "to": [ + { + "email": "onja@blastream.com" + }, + { + "email": "onja.asmad@gmail.com" + } + ], "from": "contact@blastream.com", "fromName": "Blastream", "uri": "https://api.sendgrid.com/v3/mail/send", diff --git a/src/subscribers/emailSubscriber.js b/src/subscribers/emailSubscriber.js index 9d115da..69052e3 100644 --- a/src/subscribers/emailSubscriber.js +++ b/src/subscribers/emailSubscriber.js @@ -49,11 +49,7 @@ module.exports = (app) => { const data = { personalizations: [ { - to: [ - { - email: to, - } - ], + to: to, subject: subject } ],