fix for a bug in the creation of the mail-structure. MULTIPART/RELATED parts where created as structure nested too deep, comared to the structure

used by the IMAP-server, when accessing the parts in question directly.
This commit is contained in:
Klaus Leithoff 2007-10-05 07:07:27 +00:00
parent 54ecc90b58
commit aa69ea1867

View File

@ -579,7 +579,7 @@ class Net_IMAP extends Net_IMAPProtocol {
function _parseStructureMultipartArray($_structure, &$_mimeParts, $_partID, $_parentIsMessage = false)
{
#print "Net_IMAP::_parseStructureMultipartArray _partID: $_partID<br>";
// a multipart/mixed, multipart/report or multipart/alternative get's no own partid, if the parent is message/rfc822
// a multipart/mixed, multipart/report or multipart/alternative or multipart/related get's no own partid, if the parent is message/rfc822
if($_parentIsMessage == true && is_array($_structure[0])) {
foreach($_structure as $structurePart) {
if(!is_array($structurePart)) {
@ -587,7 +587,7 @@ class Net_IMAP extends Net_IMAPProtocol {
break;
}
}
if($subType == 'mixed' || $subType == 'report' || $subType == 'alternative') {
if($subType == 'mixed' || $subType == 'report' || $subType == 'alternative' || $subType == 'related') {
$_partID = substr($_partID, 0, strrpos($_partID, '.'));
}
}