summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-17 15:23:31 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-17 15:23:31 +0000
commit27f42bb61c7def174cdaa527dabc598d29b681d1 (patch)
treef80acc633f94e248cc676cd80744d1238875fdb7
parent78adc0b1dd137c22572638f1c2f033421310ba7f (diff)
Create Sent folder when composing a message (#1486802)
git-svn-id: https://svn.roundcube.net/trunk@3817 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/steps/mail/compose.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index f59582bfe..712318d93 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/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']));
}