Skip to content
Snippets Groups Projects
Commit ffd04081 authored by Jared Hancock's avatar Jared Hancock
Browse files

pipe: Honor inline bodies as valid message

Previously, if a message had a Content-Disposition header, then it could not
be considered as the body of the message.
parent 07fec4c4
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment