summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-25 16:29:34 +0000
committeralecpl <alec@alec.pl>2008-10-25 16:29:34 +0000
commit072fdef114759dcc1c5b7ba351ff523f25b75563 (patch)
tree1bf5be58c0bbc19b85ad4b85aab03bbd0cc50be7 /program/steps/mail
parentc9ca6ada03f27bfe8c86f61f418afb86971f9dff (diff)
- Don't send disposition notification receipts for messages marked as 'read' (#1485523)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/show.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 4f0a3b032..8b36c9acd 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -69,10 +69,6 @@ if ($_GET['_uid']) {
$OUTPUT->set_pagetitle($MESSAGE->subject);
- // mark message as read
- if (!$MESSAGE->headers->seen)
- $IMAP->set_flag($MESSAGE->uid, 'SEEN');
-
// give message uid to the client
$OUTPUT->set_env('uid', $MESSAGE->uid);
// set environement
@@ -87,7 +83,7 @@ if ($_GET['_uid']) {
// check for unset disposition notification
if ($MESSAGE->headers->mdn_to &&
- !$MESSAGE->headers->mdn_sent &&
+ !$MESSAGE->headers->mdn_sent && !$MESSAGE->headers->seen &&
$IMAP->check_permflag('MDNSENT') &&
$mbox_name != $CONFIG['drafts_mbox'] &&
$mbox_name != $CONFIG['sent_mbox'])
@@ -140,6 +136,10 @@ if ($_GET['_uid']) {
$OUTPUT->set_env('next_uid', $next);
if ($last >0)
$OUTPUT->set_env('last_uid', $last);
+
+ // mark message as read
+ if (!$MESSAGE->headers->seen)
+ $IMAP->set_flag($MESSAGE->uid, 'SEEN');
}