From 8503105b39c67d019ff72b9b09096366768bf63f Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Mon, 4 Nov 2019 12:36:10 +0700 Subject: [PATCH] Improved bulk email service no-issue Used proper logging --- core/server/services/bulk-email/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/server/services/bulk-email/index.js b/core/server/services/bulk-email/index.js index 9db4819e0f88..90d281de2b16 100644 --- a/core/server/services/bulk-email/index.js +++ b/core/server/services/bulk-email/index.js @@ -1,6 +1,7 @@ // @ts-check const mailService = require('../mail'); const ghostMailer = new mailService.GhostMailer(); +const common = require('../../lib/common'); /* * An email address @@ -11,6 +12,7 @@ const ghostMailer = new mailService.GhostMailer(); * An object representing an email to send * @typedef { Object } Email * @property { string } html - The html content of the email + * @property { string } subject - The subject of the email */ module.exports = { @@ -28,7 +30,7 @@ module.exports = { await ghostMailer.send(messageToSend); } catch (err) { // @TODO log this somewhere with state? - console.log(`Oh no! an email failed to send :( ${recipient}`); + common.logging.warn(`Oh no! an email failed to send :( ${recipient}`); } } return true;