summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-29 12:56:10 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-29 12:56:10 +0000
commit4064acb7731d68963caf15c7b0e6dc39d433b522 (patch)
tree28d73c6c0858d3f94f4da042c75e071f7ea2e0f3 /roundcubemail/program/steps/mail/func.inc
parenta192257ed136ace67ac80a61d939f3e59942a92d (diff)
- Add option to automatically send read notifications for known senders (1485883)
git-svn-id: https://svn.roundcube.net/trunk@4011 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/func.inc')
-rw-r--r--roundcubemail/program/steps/mail/func.inc14
1 files changed, 11 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index 95bae0b10..d7c65236b 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -1584,12 +1584,20 @@ function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error, &$body_
return $sent;
}
-
-function rcmail_send_mdn($uid, &$smtp_error)
+/**
+ * Send the MDN response
+ *
+ * @param mixed $message Original message object (rcube_message) or UID
+ * @param array $smtp_error SMTP error array (reference)
+ *
+ * @return boolean Send status
+ */
+function rcmail_send_mdn($message, &$smtp_error)
{
global $RCMAIL, $IMAP;
- $message = new rcube_message($uid);
+ if (!is_a($message, rcube_message))
+ $message = new rcube_message($message);
if ($message->headers->mdn_to && !$message->headers->mdn_sent &&
($IMAP->check_permflag('MDNSENT') || $IMAP->check_permflag('*')))