diff --git a/backend/src/middleware/email/emailMiddleware.js b/backend/src/middleware/email/emailMiddleware.js index 8ce6973e0..1a63b2c10 100644 --- a/backend/src/middleware/email/emailMiddleware.js +++ b/backend/src/middleware/email/emailMiddleware.js @@ -8,17 +8,20 @@ let sendMail if (CONFIG.SMTP_HOST && CONFIG.SMTP_PORT) { sendMail = async templateArgs => { const transport = transporter() - transport.use('compile', htmlToText({ - ignoreImage: true, - wordwrap: false, - })) + transport.use( + 'compile', + htmlToText({ + ignoreImage: true, + wordwrap: false, + }), + ) await transport.sendMail({ from: '"Human Connection" ', ...templateArgs, }) } } else { - sendMail = () => { } + sendMail = () => {} if (process.env.NODE_ENV !== 'test') { // eslint-disable-next-line no-console console.log('Warning: Email middleware will not try to send mails.')