From 7772fd25edf095a2ea2d9debaa8e2c0c7a2d841a Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 24 Jun 2024 09:42:25 +0200 Subject: [PATCH] * Mail: fix broken PDF attachments which were quoted-printable encoded --- api/src/Mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index d25113052f..4c7ba76430 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -6259,7 +6259,7 @@ class Mail // set binary, as it's already base64 transfer-encoded but lacks the necessary header if (($part->getType() === 'application/pdf' || $part->getPrimaryType() === 'image') && // hack to read protected $structure->_transfer_encoding - unserialize($part->serialize())[9] !== 'base64') + !in_array(unserialize($part->serialize())[9], ['base64', 'quoted-printable'])) { $part->setTransferEncoding('binary', ['send' => true]); return true;