Skip to content

Commit

Permalink
fix: fixed issue with undefined host
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Sep 14, 2023
1 parent 1fa34a3 commit 03ca6ee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions helpers/send-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,13 @@ async function sendEmail({
// NOTE: this is handled because `MAIL_RETRY_ERROR_CODES` has `ECONNRESET`
// https://github.com/zone-eu/zone-mta/blob/5daa48eea4aa05e724eb2ab80fd3a957e6cc8c6c/lib/sender.js#L1140
//
if (isRetryableError(err)) {
if (isRetryableError(err) && isSANB(session?.mx?.host)) {
ignoreMXHosts.push(session.mx.host);
} else if (session.requireTLS && isTLSError(err)) {
} else if (
!isRetryableError(err) &&
session.requireTLS &&
isTLSError(err)
) {
//
// NOTE: if MTA-STS was enforced and it was TLS error then throw if not a retry code
// (safeguard is here for keeping retry codes in conditional in case this moves around)
Expand Down

0 comments on commit 03ca6ee

Please sign in to comment.