diff --git a/include/class.mailparse.php b/include/class.mailparse.php index 1e9f81a5ceebe709684f18c1cc7b1f3465783863..34209b67c52badeb4e982f624f34cea0050848a9 100644 --- a/include/class.mailparse.php +++ b/include/class.mailparse.php @@ -246,7 +246,10 @@ class Mail_Parse { if($struct && !$struct->parts) { $ctype = @strtolower($struct->ctype_primary.'/'.$struct->ctype_secondary); - if($ctype && strcasecmp($ctype,$ctypepart)==0) { + if ($struct->disposition + && (strcasecmp($struct->disposition, 'inline') !== 0)) + return ''; + if ($ctype && strcasecmp($ctype,$ctypepart)==0) { $content = $struct->body; //Encode to desired encoding - ONLY if charset is known?? if (isset($struct->ctype_parameters['charset'])) @@ -260,8 +263,7 @@ class Mail_Parse { $data=''; if($struct && $struct->parts && $recurse) { foreach($struct->parts as $i=>$part) { - if($part && !$part->disposition - && ($text=$this->getPart($part,$ctypepart,$recurse - 1))) + if($part && ($text=$this->getPart($part,$ctypepart,$recurse - 1))) $data.=$text; } }