From 53f47f5584087757d212256a8c684a1ca8e31e62 Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Sat, 5 Aug 2023 13:29:43 -0600 Subject: [PATCH] Remove unused parse function --- CRM/Utils/Mail/Incoming.php | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/CRM/Utils/Mail/Incoming.php b/CRM/Utils/Mail/Incoming.php index 86b80dd733..a0c5517424 100644 --- a/CRM/Utils/Mail/Incoming.php +++ b/CRM/Utils/Mail/Incoming.php @@ -285,41 +285,6 @@ class CRM_Utils_Mail_Incoming { return $name . "<{$address->email}>"; } - /** - * @param $file - * - * @return array - * @throws Exception - */ - public function &parse(&$file) { - - // check that the file exists and has some content - if (!file_exists($file) || - !trim(file_get_contents($file)) - ) { - return CRM_Core_Error::createAPIError(ts('%1 does not exists or is empty', - [1 => $file] - )); - } - - // explode email to digestable format - $set = new ezcMailFileSet([$file]); - $parser = new ezcMailParser(); - $mail = $parser->parseMail($set); - - if (!$mail) { - return CRM_Core_Error::createAPIError(ts('%1 could not be parsed', - [1 => $file] - )); - } - - // since we only have one fileset - $mail = $mail[0]; - - $mailParams = self::parseMailingObject($mail); - return $mailParams; - } - /** * @param $mail * @param $createContact -- 2.25.1