Author: leithoff
New Revision: 55349
URL: http://svn.stylite.de/viewvc/egroupware?rev=55349&view=rev
Log:
attempt to fix an issue whith screwed Content-Transfer-Encoding when opening attached/forwarded messages (message/rfc822)
Modified:
trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php
— trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php (original)
+++ trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php Thu Mar 10 16:01:30 2016
@@ -4653,6 +4653,7 @@
case ‘plain’:
default:
$bodyPart = array($this->getTextPart($_uid, $_structure, $this->htmlOptions, $_preserveSeen));
+error_log(METHOD.LINE.array2string($bodyPart));
}
} else {
// what if the structure->disposition is attachment ,…
@@ -5774,7 +5775,7 @@
// we need to set content on structure to decode transfer encoding
$part->setContents(
$this->getBodyPart($_uid, $part->getMimeId(), null, $_preserveSeen, $_stream, $encoding, $fetchAsBinary),
-
array('encoding' => (!$fetchAsBinary&&!$encoding?'8bit':$encoding)));
return $part;
}
@@ -6719,6 +6720,7 @@
{
$structure = Horde_Mime_Part::parseMessage($message);
$mailer->setBasePart($structure);
-
//error_log(__METHOD__.__LINE__.':'.array2string($structure));
// unfortunately parseMessage does NOT return parsed headers (we assume header is shorter then 8k)
$start = is_string($message) ? substr($message, 0, 8192) :
@@ -6735,7 +6737,14 @@
$overwrite = !$n;
switch($header)
{
-
case 'Content-Transfer-Encoding':
-
//as we parse the message and this sets the part with a Content-Transfer-Encoding, we
-
//should not overwrite it with the header-values of the source-message as the encoding
-
//may be altered when retrieving the message e.g. from server
-
//error_log(__METHOD__.__LINE__.':'.$header.'->'.$val.'<->'.$mailer->getHeader('Content-Transfer-Encoding'));
-
break;
default:
-
//error_log(__METHOD__.__LINE__.':'.$header.'->'.$val);
$mailer->addHeader($header, $val, $overwrite);
}
}
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs