diff options
author | thomascube <thomas@roundcube.net> | 2010-07-17 15:23:31 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2010-07-17 15:23:31 +0000 |
commit | 90e7080d28115773eba8ad715722b182d294e8c9 (patch) | |
tree | 06b634feb85136b7f3c6dc66a1ffb33a95432f2a /program/steps/mail | |
parent | 9a4fd756a911dc976a550f18c2a301ba80149f7e (diff) |
Create Sent folder when composing a message (#1486802)
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/compose.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index f59582bfe..712318d93 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -91,6 +91,15 @@ if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_v } } + // check if folder for saving sent messages exists and is subscribed (#1486802) + if (($sent_folder = $_SESSION['compose']['param']['sent_mbox']) && !$IMAP->mailbox_exists($sent_folder, true)) { + // folder may exist but isn't subscribed (#1485241) + if (!$IMAP->mailbox_exists($sent_folder)) + $IMAP->create_mailbox($sent_folder, true); + else + $IMAP->subscribe($sent_folder); + } + // redirect to a unique URL with all parameters stored in session $OUTPUT->redirect(array('_action' => 'compose', '_id' => $_SESSION['compose']['id'])); } |