dev/core#4780 handle bounce processing when verp unverified
authorBrian Shaughnessy <brian@lcdservices.biz>
Fri, 17 Nov 2023 18:23:38 +0000 (13:23 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Fri, 17 Nov 2023 18:23:38 +0000 (13:23 -0500)
CRM/Utils/Mail/EmailProcessor.php

index 813dc1d15a266d0ebe9a117ebc51ca7a880b26b7..edc5a3aeb4f85380e7aea3a5074196f237ac3573 100644 (file)
@@ -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();