From a2b018bef873950fb7e9bbfada930e7430477c42 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 31 Mar 2015 09:49:57 +0000 Subject: [PATCH] * Calendar: meeting requests were not recogniced by other clients as such because of lost method parameter --- phpgwapi/inc/class.egw_mailer.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpgwapi/inc/class.egw_mailer.inc.php b/phpgwapi/inc/class.egw_mailer.inc.php index e781b7468e..1f0e1b3efd 100644 --- a/phpgwapi/inc/class.egw_mailer.inc.php +++ b/phpgwapi/inc/class.egw_mailer.inc.php @@ -314,6 +314,11 @@ class egw_mailer extends Horde_Mime_Mail } $part = new Horde_Mime_Part(); $part->setType($type ? $type : egw_vfs::mime_content_type($file)); + $matches = null; + if (preg_match('/^([^;]+);\s*([^=]+)=([^;]+)$/', $type, $matches)) + { + $part->setContentTypeParameter($matches[2], $matches[3]); + } $part->setContents($resource); $part->setName($name ? $name : egw_vfs::basename($file)); @@ -380,6 +385,11 @@ class egw_mailer extends Horde_Mime_Mail $part = new Horde_Mime_Part(); $part->setType($type); + $matches = null; + if (preg_match('/^([^;]+);\s*([^=]+)=([^;]+)$/', $type, $matches)) + { + $part->setContentTypeParameter($matches[2], $matches[3]); + } $part->setCharset('utf-8'); $part->setContents($content); // this should not be necessary, because binary data get detected by mime-type,