From 4610152d908503782fbed8b78739b31a34fab634 Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Thu, 10 Dec 2015 01:41:24 -0500 Subject: [PATCH] Expose IMP_Indices::mdnCheck via the API. Needed for Request: 14122 --- imp/lib/Api.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/imp/lib/Api.php b/imp/lib/Api.php index c463e4c0da8..53df3902d0c 100644 --- a/imp/lib/Api.php +++ b/imp/lib/Api.php @@ -499,4 +499,18 @@ public function getMaillogChanges($ts) ); } + /** + * Check if we need to send a MDN, and send if needed/able. Will only send + * MDN if the request does NOT need to be confirmed by the user. + * + * @param Horde_Mime_Headers $headers The headers of the message. + * + * @return boolean True if the MDN request was able to be sent. + */ + public function mdnSend(Horde_Mime_Headers $headers, $mailbox, $uid) + { + $indices = new IMP_Indices($mailbox, $uid); + return !$indices->mdnCheck($headers); + } + }