From faa1e174609de8c3fef94eb98b1f08bc4951e000 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 26 Jun 2023 08:43:29 -0600 Subject: [PATCH] Mail: Fix event detection in multipart mixed mails Meeting form was not presented, just request content --- api/src/Mail.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index a6a2b61597..c2c35cbb34 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -4729,13 +4729,18 @@ class Mail case 'text': switch($part->getSubType()) { + case 'calendar': // inline ics/ical files + if($part->getBytes() > 0) + { + $partCalendar = $part; + } + // Fall through in case user has no calendar access case 'plain': case 'html': - case 'calendar': // inline ics/ical files if($part->getDisposition() != 'attachment') { $bodyPart[] = $this->getTextPart($_uid, $part, $_htmlMode, $_preserveSeen); - $skipParts[$mime_id]=$mime_type; + $skipParts[$mime_id] = $mime_type; } //error_log(__METHOD__.' ('.__LINE__.') '.' ->'.$part->type."/".$part->subType.' -> BodyPart:'.array2string($bodyPart[count($bodyPart)-1])); break;