fix for cascading Multipart/Alternative

This commit is contained in:
Klaus Leithoff 2010-07-15 11:24:33 +00:00
parent b291c0fa5f
commit dfc04c4b29

View File

@ -1639,7 +1639,7 @@
$partText = false;
$partHTML = false;
if (self::$debug) _debug_array($_structure);
if (self::$debug) _debug_array(array("METHOD"=>__METHOD__,"LINE"=>__LINE__,"STRUCTURE"=>$_structure));
foreach($_structure as $mimePart) {
if($mimePart->type == 'TEXT' && $mimePart->subType == 'PLAIN' && $mimePart->bytes > 0) {
$partText = $mimePart;
@ -1650,6 +1650,9 @@
#$partHTML = array($mimePart);
error_log(__METHOD__." process MULTIPART/RELATED with array as subparts");
$partHTML = $mimePart;
} elseif ($mimePart->type == 'MULTIPART' && $mimePart->subType == 'ALTERNATIVE' && is_array($mimePart->subParts)) {
//cascading multipartAlternative structure, assuming only the first one is to be used
return $this->getMultipartAlternative($_uid,$mimePart->subParts,$_htmlMode);
}
}