diff --git a/server/email/sendemail.js b/server/email/sendemail.js index c585b4815..802d61e0f 100644 --- a/server/email/sendemail.js +++ b/server/email/sendemail.js @@ -240,14 +240,13 @@ exports.emailBounce = async function (req, res, next) { to: "patrick@snapt.ca", // replyTo, bcc: "patrick@snapt.ca", subject: `ImEX Online Bounced Email - RE: ${subject}`, - text: ` - ImEX Online has tried to deliver an email with the subject: ${subject} to the intended recipients but encountered an error. + text: `ImEX Online has tried to deliver an email with the subject: ${subject} to the intended recipients but encountered an error. - ${message.bounce?.bouncedRecipients.map( - (r) => - `Recipient: ${r.emailAddress} | Status: ${r.action} | Code: ${r.diagnosticCode} +${message.bounce?.bouncedRecipients.map( + (r) => + `Recipient: ${r.emailAddress} | Status: ${r.action} | Code: ${r.diagnosticCode} ` - )} +)} `, }, (err, info) => {