Running the fetch_activities cli task stops with a fatal error when the incomming...
authorDavid Hayes <david@blackbricksoftware.com>
Sun, 13 Sep 2015 23:03:30 +0000 (18:03 -0500)
committerDavid Hayes <david@blackbricksoftware.com>
Sun, 13 Sep 2015 23:03:30 +0000 (18:03 -0500)
Error Message: "No clue about the ezcMailDeliveryStatus"

This patch catches that error, prints it, marks the offending email ignored, and allows activities processing to continue.

CRM/Utils/Mail/EmailProcessor.php

index 7450684b7b1cdc39e87e57a5725b831bd01ab35c..b83f19aef13c35a29ec31796dc0d9e824528095f 100644 (file)
@@ -238,8 +238,14 @@ class CRM_Utils_Mail_EmailProcessor {
 
         // preseve backward compatibility
         if ($usedfor == 0 || !$civiMail) {
-          // if its the activities that needs to be processed ..
-          $mailParams = CRM_Utils_Mail_Incoming::parseMailingObject($mail);
+           // if its the activities that needs to be processed ..
+          try {
+                       $mailParams = CRM_Utils_Mail_Incoming::parseMailingObject($mail);
+                 } catch (Exception $e) {
+                       echo $e->getMessage();
+                       $store->markIgnored($key);
+                       continue;
+                 }
 
           require_once 'CRM/Utils/DeprecatedUtils.php';
           $params = _civicrm_api3_deprecated_activity_buildmailparams($mailParams, $emailActivityTypeId);