From 5786979a94efd2bf8a3ad8e0333c1409b6aaa683 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 7 Jan 2014 13:03:53 +0000 Subject: [PATCH] * Mail/Mailhandling: introduce option >mail text only< for better control of import of mails to other apps --- mail/inc/class.mail_bo.inc.php | 5 +++-- mail/lang/egw_de.lang | 1 + mail/lang/egw_en.lang | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index 12c07499da..92a78bb9fb 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -4781,13 +4781,14 @@ class mail_bo * @param mailbox the mailbox, that holds the message * @param preserveHTML flag to pass through to getdisplayableBody * @param addHeaderSection flag to be able to supress headersection + * @param includeAttachments flag to be able to supress possible attachments * @return array/bool with 'mailaddress'=>$mailaddress, * 'subject'=>$subject, * 'message'=>$message, * 'attachments'=>$attachments, * 'headers'=>$headers,; boolean false on failure */ - static function get_mailcontent(&$mailClass,$uid,$partid='',$mailbox='', $preserveHTML = false, $addHeaderSection=true) + static function get_mailcontent(&$mailClass,$uid,$partid='',$mailbox='', $preserveHTML = false, $addHeaderSection=true, $includeAttachments=true) { //echo __METHOD__." called for $uid,$partid
"; $headers = $mailClass->getMessageHeader($uid,$partid,true); @@ -4807,7 +4808,7 @@ class mail_bo } } //error_log(array2string($bodyParts)); - $attachments = $mailClass->getMessageAttachments($uid,$partid); + $attachments = $includeAttachments?$mailClass->getMessageAttachments($uid,$partid):array(); if ($mailClass->isSentFolder($mailbox)) $mailaddress = $headers['TO']; elseif (isset($headers['FROM'])) $mailaddress = $headers['FROM']; diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index cc7de9ccf3..0f0841f34d 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -53,6 +53,7 @@ connect to profile %1 mail de Verbunden zu dem Profil :%1 connection status mail de Verbindungsstatus contains mail de beinhaltet contains(*) mail de enthält(*) +convert only mail to item (ignore possible attachments) mail de konvertiere nur den E-Mail-Text zum Eintrag ohne mögliche Anhänge zu beachten convert mail to item and attach its attachments to this item (standard) mail de konvertiere E-Mail zum Eintrag und füge die Mailanhänge hinzu (Standard) convert mail to item, attach its attachments and add raw message (message/rfc822 (.eml)) as attachment mail de konvertiere E-Mail zum Eintrag und füge die Mailanhänge, sowie die Original Nachricht, als message/rfc (.eml) Datei hinzu. copied %1 message(s) from %2 to %3 mail de %1 Nachricht(en) wurden von %2 nach %3 kopiert diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index 8d76ae04a9..f9361d118b 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -52,6 +52,7 @@ connect to profile %1 mail en Connect to Profile %1 connection status mail en Connection Status contains mail en contains contains(*) mail en Contains(*) +convert only mail to item (ignore possible attachments) mail en convert only Mail to item (ignore possible attachments) convert mail to item and attach its attachments to this item (standard) mail en convert Mail to item and attach its attachments to this item (standard) convert mail to item, attach its attachments and add raw message (message/rfc822 (.eml)) as attachment mail en convert Mail to item, attach its attachments and add raw message (message/rfc822 (.eml)) as attachment copied %1 message(s) from %2 to %3 mail en copied %1 message(s) from %2 to %3