* eMail: support multipart/mixed mails with html parts to display (apple mail does that kind of emails)

This commit is contained in:
Klaus Leithoff 2013-01-15 12:06:38 +00:00
parent 9c51baae56
commit acbf3c4301

View File

@ -2314,7 +2314,7 @@ class felamimail_bo
if ($mimePart->subType == 'PLAIN') $partText = $mimePart; if ($mimePart->subType == 'PLAIN') $partText = $mimePart;
} elseif($mimePart->type == 'TEXT' && $mimePart->subType == 'HTML' && $mimePart->bytes > 0) { } elseif($mimePart->type == 'TEXT' && $mimePart->subType == 'HTML' && $mimePart->bytes > 0) {
$partHTML = $mimePart; $partHTML = $mimePart;
} elseif ($mimePart->type == 'MULTIPART' && $mimePart->subType == 'RELATED' && is_array($mimePart->subParts)) { } elseif ($mimePart->type == 'MULTIPART' && ($mimePart->subType == 'RELATED' || $mimePart->subType == 'MIXED') && is_array($mimePart->subParts)) {
// in a multipart alternative we treat the multipart/related as html part // in a multipart alternative we treat the multipart/related as html part
#$partHTML = array($mimePart); #$partHTML = array($mimePart);
if (self::$debug) error_log(__METHOD__." process MULTIPART/RELATED with array as subparts"); if (self::$debug) error_log(__METHOD__." process MULTIPART/RELATED with array as subparts");
@ -2331,6 +2331,8 @@ class felamimail_bo
if(is_object($partHTML)) { if(is_object($partHTML)) {
if($partHTML->subType == 'RELATED') { if($partHTML->subType == 'RELATED') {
return $this->getMultipartRelated($_uid, $partHTML, $_htmlMode, $_preserveSeen); return $this->getMultipartRelated($_uid, $partHTML, $_htmlMode, $_preserveSeen);
} elseif($partHTML->subType == 'MIXED') {
return $this->getMultipartMixed($_uid, $partHTML, $_htmlMode, $_preserveSeen);
} else { } else {
return $this->getTextPart($_uid, $partHTML, $_htmlMode, $_preserveSeen); return $this->getTextPart($_uid, $partHTML, $_htmlMode, $_preserveSeen);
} }