Fixed the gui mime parser

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2020-03-14 12:40:37 +01:00
parent 4ea1213d3d
commit 60b61ba225

View File

@ -123,6 +123,17 @@ class Piler_Mime_Decode {
self::splitMessageRaw($msg, $headers, $j, $body);
}
}
// If the message has a single binary attachment, then drop the body part
if(isset($headers_array['content-type']['type'])) {
foreach(['application/', 'image/'] as $type) {
if(strstr($headers_array['content-type']['type'], $type)) {
$body = '';
break;
}
}
}
}
else {
$headers = $message;