Updated recipieint for bounced emails since testing confirmed.
This commit is contained in:
@@ -215,7 +215,7 @@ exports.emailBounce = async function (req, res, next) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (body.notificationType === "Bounce") {
|
if (body.notificationType === "Bounce") {
|
||||||
// const message = JSON.parse(body.Message);
|
// const message = JSON.parse(body.Message);
|
||||||
let replyTo, subject, messageId;
|
let replyTo, subject, messageId;
|
||||||
body.mail.headers.forEach((header) => {
|
body.mail.headers.forEach((header) => {
|
||||||
if (header.name === "Reply-To") {
|
if (header.name === "Reply-To") {
|
||||||
@@ -235,7 +235,7 @@ exports.emailBounce = async function (req, res, next) {
|
|||||||
transporter.sendMail(
|
transporter.sendMail(
|
||||||
{
|
{
|
||||||
from: `ImEX Online <noreply@imex.online>`,
|
from: `ImEX Online <noreply@imex.online>`,
|
||||||
to: "patrick@snapt.ca", // replyTo,
|
to: replyTo,
|
||||||
bcc: "patrick@snapt.ca",
|
bcc: "patrick@snapt.ca",
|
||||||
subject: `ImEX Online Bounced Email - RE: ${subject}`,
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user