From 7349cf080926ba68d740e6fc08b7d67f96509972 Mon Sep 17 00:00:00 2001 From: Chris Burgess Date: Mon, 9 Jan 2017 17:52:06 +1300 Subject: [PATCH] CRM-19844: Fire hook_civicrm_emailProcessor('activity') only in event of Activity API success. If this is triggered when the Activity API call was unsuccessful, it can lead to the mailbox processing being blocked by the rejected email. Further emails may not be processed. --- CRM/Utils/Mail/EmailProcessor.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Utils/Mail/EmailProcessor.php b/CRM/Utils/Mail/EmailProcessor.php index ccc16fbc8d..a995b7af8f 100644 --- a/CRM/Utils/Mail/EmailProcessor.php +++ b/CRM/Utils/Mail/EmailProcessor.php @@ -259,10 +259,9 @@ class CRM_Utils_Mail_EmailProcessor { } else { $matches = TRUE; + CRM_Utils_Hook::emailProcessor('activity', $params, $mail, $result); echo "Processed as Activity: {$mail->subject}\n"; } - - CRM_Utils_Hook::emailProcessor('activity', $params, $mail, $result); } // if $matches is empty, this email is not CiviMail-bound -- 2.25.1