Skip to content

Commit 43f49e0

Browse files
committed
fix: detect imip messages from outlook.com
Adjust the parsing logic in MessageMapper to correctly detect iMIP messages in flat email structures where the text/calendar part is not wrapped in multipart/alternative. Signed-off-by: Daniel Kesselberg <[email protected]>
1 parent ea73929 commit 43f49e0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/IMAP/MessageMapper.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -890,15 +890,13 @@ public function getBodyStructureData(Horde_Imap_Client_Socket $client,
890890
$structure = $fetchData->getStructure();
891891

892892
/** @var Horde_Mime_Part $part */
893-
foreach ($structure->getParts() as $part) {
893+
foreach ($structure->partIterator() as $part) {
894894
if ($part->isAttachment()) {
895895
$hasAttachments = true;
896896
}
897-
$bodyParts = $part->getParts();
898-
/** @var Horde_Mime_Part $bodyPart */
899-
foreach ($bodyParts as $bodyPart) {
900-
$contentParameters = $bodyPart->getAllContentTypeParameters();
901-
if ($bodyPart->getType() === 'text/calendar' && isset($contentParameters['method'])) {
897+
898+
if ($part->getType() === 'text/calendar') {
899+
if ($part->getContentTypeParameter('method') !== null) {
902900
$isImipMessage = true;
903901
}
904902
}

0 commit comments

Comments
 (0)