From 12618de9a11097bde9ae6fc504d75776d4ac2065 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Fri, 17 Nov 2023 13:23:38 -0500 Subject: [PATCH] dev/core#4780 handle bounce processing when verp unverified --- CRM/Utils/Mail/EmailProcessor.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); -- 2.25.1