diff options
author | alecpl <alec@alec.pl> | 2010-09-29 12:56:10 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-09-29 12:56:10 +0000 |
commit | a99968259d001ebc8bd98f0f2a0aa544ed4740e8 (patch) | |
tree | 919414917e3963878df8323820eb4693b57cb27b /program/steps/mail/func.inc | |
parent | e99991996dbb9e7b0b0ff6cfa94dc0fb2522eb66 (diff) |
- Add option to automatically send read notifications for known senders (1485883)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r-- | program/steps/mail/func.inc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 95bae0b10..d7c65236b 100644 --- a/program/steps/mail/func.inc +++ b/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('*'))) |