From: Brian Shaughnessy Date: Fri, 17 Nov 2023 18:23:38 +0000 (-0500) Subject: dev/core#4780 handle bounce processing when verp unverified X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=12618de9a11097bde9ae6fc504d75776d4ac2065;p=civicrm-core.git dev/core#4780 handle bounce processing when verp unverified --- diff --git a/CRM/Utils/Mail/EmailProcessor.php b/CRM/Utils/Mail/EmailProcessor.php index 813dc1d15a..edc5a3aeb4 100644 --- a/CRM/Utils/Mail/EmailProcessor.php +++ b/CRM/Utils/Mail/EmailProcessor.php @@ -118,7 +118,14 @@ class CRM_Utils_Mail_EmailProcessor { // process fifty at a time, CRM-4002 while ($mails = $store->fetchNext(MAIL_BATCH_SIZE)) { foreach ($mails as $key => $mail) { - $incomingMail = new CRM_Utils_Mail_IncomingMail($mail, (string) $dao->domain, (string) $dao->localpart); + try { + $incomingMail = new CRM_Utils_Mail_IncomingMail($mail, (string) $dao->domain, (string) $dao->localpart); + } + catch (CRM_Core_Exception $e) { + $store->markIgnored($key); + continue; + } + $action = $incomingMail->getAction(); $job = $incomingMail->getJobID(); $queue = $incomingMail->getQueueID();