From 5502d9b06f15d6e125c06468d5bc341c3cccdddb Mon Sep 17 00:00:00 2001 From: titanism <101466223+titanism@users.noreply.github.com> Date: Wed, 18 Dec 2024 05:15:05 -0600 Subject: [PATCH] fix: fixed text break and from address in DMARC issue email --- emails/dmarc-issue/html.pug | 15 +++++++++------ helpers/on-data-mx.js | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/emails/dmarc-issue/html.pug b/emails/dmarc-issue/html.pug index f9593f0fe..901012045 100644 --- a/emails/dmarc-issue/html.pug +++ b/emails/dmarc-issue/html.pug @@ -28,17 +28,20 @@ block content tbody tr th: span.badge.badge-pill.badge-dark MAIL FROM - td: code= mailFrom + td: code.text-break= mailFrom tr th: span.badge.badge-pill.badge-dark RCPT TO td - code= rcptTo + code.text-break= rcptTo tr th: span.badge.badge-pill.badge-primary Message-ID - td: code= messageId + td: code.text-break= messageId + tr + th: span.badge.badge-pill.badge-primary From + td= fromAddress tr th: span.badge.badge-pill.badge-primary Subject - td= subject + td.text-break= subject tr th: span.badge.badge-pill.badge-primary Date td= date @@ -51,10 +54,10 @@ block content td.text-left= truthSource tr th= t("SMTP Response") - td.markdown-body.text-left: pre.mb-0: code= response + td.markdown-body.text-left.text-break: pre.mb-0: code.text-break= response tr th= t("DMARC Results") - td.markdown-body.text-left: pre.mb-0: code= JSON.stringify(dmarc, null, 2) + td.markdown-body.text-left.text-break: pre.mb-0: code.text-break= JSON.stringify(dmarc, null, 2) .p-3 h2.h5= t("What will happen if I don't resolve this?") p.card-text diff --git a/helpers/on-data-mx.js b/helpers/on-data-mx.js index 7d8600ba6..788e9f2c6 100644 --- a/helpers/on-data-mx.js +++ b/helpers/on-data-mx.js @@ -161,6 +161,7 @@ async function sendSysAdminEmail(template, err, session, headers) { : '', rcptTo: session.envelope.rcptTo.map((to) => to.address).join(', '), messageId: getHeaders(headers, 'message-id'), + fromAddress: session.originalFromAddress, subject: getHeaders(headers, 'subject'), date: getHeaders(headers, 'date'), response: err.response || err.message,