From 816c9c0a96f81bd64e6770ce1c9f2d5e43fcf5f2 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 5 Oct 2015 13:15:17 +0000 Subject: [PATCH] * Calendar/Mail: fix edit action meeting-requests to NOT set content-disposition: attachment, as this seems to stop automatic processing in Exchange --- phpgwapi/inc/class.egw_mailer.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.egw_mailer.inc.php b/phpgwapi/inc/class.egw_mailer.inc.php index c57bb91556..6c51697e90 100644 --- a/phpgwapi/inc/class.egw_mailer.inc.php +++ b/phpgwapi/inc/class.egw_mailer.inc.php @@ -338,7 +338,6 @@ class egw_mailer extends Horde_Mime_Mail $part->setContentTypeParameter($matches[2], $matches[3]); } $part->setContents($resource); - if ($name || !is_resource($data)) $part->setName($name ? $name : egw_vfs::basename($data)); // store "text/calendar" as _htmlBody, to trigger "multipart/alternative" if (stripos($type,"text/calendar; method=") !== false) @@ -346,6 +345,9 @@ class egw_mailer extends Horde_Mime_Mail $this->_htmlBody = $part; return; } + // setting name, also sets content-disposition attachment (!), therefore we have to do it after "text/calendar; method=" handling + if ($name || !is_resource($data)) $part->setName($name ? $name : egw_vfs::basename($data)); + // this should not be necessary, because binary data get detected by mime-type, // but at least Cyrus complains about NUL characters $part->setTransferEncoding('base64', array('send' => true));