mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
fix bug when importing multipart mixed messages, if html part was present it may have been marked as text/plain; fixed bug regarding addresslines with destination folder (where falsely treated as emailaddresses)
This commit is contained in:
parent
9d30ff7686
commit
3090c19970
@ -4998,7 +4998,7 @@ class felamimail_bo
|
||||
$partFetched = false;
|
||||
//echo __METHOD__.__LINE__.$structure->ctype_primary.'/'.$structure->ctype_secondary.'<br>';
|
||||
if ($part->headers['content-transfer-encoding']) $mailObject->Encoding = $part->headers['content-transfer-encoding'];
|
||||
$mailObject->IsHTML($part->ctype_secondary=='html'?true:false);
|
||||
//$mailObject->IsHTML($part->ctype_secondary=='html'?true:false); // we do not set this here, as the default is text/plain
|
||||
if (isset($part->ctype_parameters['charset'])) $mailObject->CharSet = trim($part->ctype_parameters['charset']);
|
||||
if (($structure->ctype_secondary=='alternative'||
|
||||
$structure->ctype_secondary=='mixed' ||
|
||||
@ -5021,7 +5021,7 @@ class felamimail_bo
|
||||
//error_log(__METHOD__.__LINE__.$part->ctype_primary.'/'.$part->ctype_secondary.' already fetched Content is HTML='.$isHTML.' Body:'.$part->body);
|
||||
$bodyPart = $part->body;
|
||||
if ($decode) $bodyPart = $this->decodeMimePart($part->body,($part->headers['content-transfer-encoding']?$part->headers['content-transfer-encoding']:'base64'));
|
||||
//$mailObject->IsHTML(true); // do we need/want that here?
|
||||
$mailObject->IsHTML(true); // we need/want that here, because looping through all message parts may mess up the message body mimetype
|
||||
$mailObject->Body = ($isHTML?$mailObject->Body:'').$bodyPart;
|
||||
$alternatebodyneeded = true;
|
||||
$isHTML=true;
|
||||
|
@ -484,7 +484,7 @@
|
||||
if ($addressObject->host == '.SYNTAX-ERROR.') continue;
|
||||
$address = imap_rfc822_write_address($addressObject->mailbox,$addressObject->host,$addressObject->personal);
|
||||
$address = felamimail_bo::htmlentities($address, $this->displayCharset);
|
||||
$this->t->set_var('address', $address);
|
||||
$this->t->set_var('address', ($destination=='folder'?$value:$address));
|
||||
$this->t->parse('destinationRows','destination_row',True);
|
||||
$destinationRows++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user