mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
fixing the fix, only set binary, if it has not content-transfer-encoding header with value base64
This commit is contained in:
parent
5cf6253f77
commit
8a9e75360c
@ -7323,8 +7323,11 @@ class Mail
|
|||||||
$structure->setTransferEncoding('8bit');
|
$structure->setTransferEncoding('8bit');
|
||||||
$structure->setCharset('utf-8');
|
$structure->setCharset('utf-8');
|
||||||
}
|
}
|
||||||
// if we have no text body, but only a PDF or an image, set binary, as it's already base64 transfer-encoded
|
// if we have no text body, but only a PDF or an image AND transfer-encoding is NOT base64,
|
||||||
if ($structure->getType() === 'application/pdf' || $structure->getPrimaryType() === 'image')
|
// set binary, as it's already base64 transfer-encoded but lacks the necessary header
|
||||||
|
if (($structure->getType() === 'application/pdf' || $structure->getPrimaryType() === 'image') &&
|
||||||
|
// hack to read protected $structure->_transfer_encoding
|
||||||
|
unserialize($structure->serialize())[9] !== 'base64')
|
||||||
{
|
{
|
||||||
$structure->setTransferEncoding('binary', ['send' => true]);
|
$structure->setTransferEncoding('binary', ['send' => true]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user