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),