From: David Hayes Date: Sun, 13 Sep 2015 23:03:30 +0000 (-0500) Subject: Running the fetch_activities cli task stops with a fatal error when the incomming... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5fdd5f80e713ad37459f45056fc35687144e45ad;p=civicrm-core.git Running the fetch_activities cli task stops with a fatal error when the incomming mail parser is unable to determine the ezcMailDeliveryStatus. The fetch_activities task will continue to download and attempt to parse the offending email, dying every time. This prevents other mails from being downloaded and parsed. 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. --- diff --git a/CRM/Utils/Mail/EmailProcessor.php b/CRM/Utils/Mail/EmailProcessor.php index 7450684b7b..b83f19aef1 100644 --- a/CRM/Utils/Mail/EmailProcessor.php +++ b/CRM/Utils/Mail/EmailProcessor.php @@ -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);