diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index 8ef6024106..a4ef6806c3 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -19,5 +19,4 @@ */ class mail_bo extends emailadmin_imapbase { - } diff --git a/mail/inc/class.mail_bosieve.inc.php b/mail/inc/class.mail_bosieve.inc.php index 321de6a53b..492507f3f2 100644 --- a/mail/inc/class.mail_bosieve.inc.php +++ b/mail/inc/class.mail_bosieve.inc.php @@ -3,7 +3,7 @@ * EGroupware EMail - timed vacation * * @link http://www.stylite.de - * @package felamimail + * @package mail * @author Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 0e92a1585b..61324a7e53 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1887,6 +1887,10 @@ unset($query['actions']); else $data["flags"][$flag] = $flag; } } + $data['dispositionnotificationto'] = $header['DISPOSITION-NOTIFICATION-TO']; + if (($header['mdnsent']||$header['mdnnotsent']|$header['seen'])&&isset($data['dispositionnotificationto'])) unset($data['dispositionnotificationto']); + if ($header['mdnsent']) $data["flags"]['mdnsent']; + if ($header['mdnnotsent']) $data["flags"]['mdnnotsent']; $data['attachmentsPresent'] = $imageTag; $data['attachmentsBlock'] = $imageHTMLBlock; $data['address'] = ($_folderType?$data["toaddress"]:$data["fromaddress"]); @@ -4077,6 +4081,21 @@ $this->partID = $partID; } } + /** + * sendMDN, ... + * + * @param array _messageList list of UID's + * + * @return nothing + */ + function ajax_sendMDN($_messageList) + { + if(mail_bo::$debug); error_log(__METHOD__."->".array2string($_messageList)); + $uidA = self::splitRowID($_messageList['msg'][0]); + $folder = $uidA['folder']; // all messages in one set are supposed to be within the same folder + $this->mail_bo->sendMDN($uidA['msgUID'],$folder); + } + /** * flag messages as read, unread, flagged, ... * diff --git a/mail/js/app.js b/mail/js/app.js index 8577d5822d..bb9962d230 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -650,6 +650,27 @@ app.classes.mail = AppJS.extend( this.mail_removeRowClass(messages,'unseen'); // reduce counter without server roundtrip this.mail_reduceCounterWithoutServerRoundtrip(); + if (typeof dataElem.data.dispositionnotificationto != 'undefined' && typeof dataElem.data.flags.mdnsent == 'undefined' && typeof dataElem.data.flags.mdnnotsent == 'undefined') + { + var buttons = [ + {text: this.egw.lang("Yes"), id: "mdnsent"}, + {text: this.egw.lang("No"), id:"mdnnotsent"} + ]; + et2_dialog.show_dialog(function(_button_id, _value) { + switch (_button_id) + { + case "mdnsent": + egw.jsonq('mail.mail_ui.ajax_sendMDN',[messages]); + egw.jsonq('mail.mail_ui.ajax_flagMessages',['mdnsent', messages, true]); + return; + case "mdnnotsent": + egw.jsonq('mail.mail_ui.ajax_flagMessages',['mdnnotsent', messages, true]); + } + }, + this.egw.lang("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?"), + this.egw.lang("Confirm"), + messages, buttons); + } egw.jsonq('mail.mail_ui.ajax_flagMessages',['read', messages, false]); } // Pre-load next email already so user gets it faster