diff options
author | alecpl <alec@alec.pl> | 2008-12-19 14:26:55 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-12-19 14:26:55 +0000 |
commit | 4e74d2cb1bd0a2d2ee90c15bd6ce690beaeffabb (patch) | |
tree | bf5e681bd09c6ae4482d7198a60ca5a9d362b3a1 /program | |
parent | e943e1a96131301aa6da0e3730d947490f447a76 (diff) |
- fix draft autosave
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/sendmail.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 20f90794b..f92f0f7b4 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -425,7 +425,8 @@ if ($store_target) if ($olddraftmessageid) { // delete previous saved draft - $a_deleteid = $IMAP->search($CONFIG['drafts_mbox'], 'HEADER Message-ID', $olddraftmessageid); + $a_deleteid = $IMAP->search($CONFIG['drafts_mbox'], 'HEADER Message-ID '.$olddraftmessageid); + $deleted = $IMAP->delete_message($IMAP->get_uid($a_deleteid[0], $CONFIG['drafts_mbox']), $CONFIG['drafts_mbox']); // raise error if deletion of old draft failed @@ -440,7 +441,7 @@ if ($savedraft) $msgid = strtr($message_id, array('>' => '', '<' => '')); // remember new draft-uid - $draftids = $IMAP->search($CONFIG['drafts_mbox'], 'HEADER Message-ID', $msgid); + $draftids = $IMAP->search($CONFIG['drafts_mbox'], 'HEADER Message-ID '.$msgid); $_SESSION['compose']['param']['_draft_uid'] = $IMAP->get_uid($draftids[0], $CONFIG['drafts_mbox']); // display success |