From c597acea60564a0c5c07cb2b4eb9bd8fdc12d243 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 12 Jun 2017 13:40:34 +0000 Subject: [PATCH] mail: allow 7bit contents git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3753 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- mail.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mail.php b/mail.php index 296ef64..aa90350 100644 --- a/mail.php +++ b/mail.php @@ -273,7 +273,8 @@ class mail if ($parts[$i] === "") continue; $messagePart = $this->parseMessagePart ($parts[$i]); - if ($messagePart === null) + if ($messagePart === null || + ! array_key_exists ("_contentType", $messagePart)) continue; $messagePart["_parentID"] = $sectionIDParent; $sectionIDChild = $this->sectionAdd ($messagePart); @@ -1396,8 +1397,8 @@ class mail return quoted_printable_decode ($content); elseif ($encoding === "base64") return base64_decode ($content); - elseif ($encoding === "8bit") - return ($content); + elseif ($encoding === "8bit" || $encoding === "7bit") + return $content; throw new \Exception (sprintf ( _("Invalid encoding provided to encodingDecode : '%s'"), $encoding),