diff options
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 48e485ce2..efac8b2d2 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -205,9 +205,6 @@ function rcmail_imap_init($connect=FALSE) if ($CONFIG['enable_caching']===TRUE) $IMAP->set_caching(TRUE); - if (is_array($CONFIG['default_imap_folders'])) - $IMAP->set_default_mailboxes($CONFIG['default_imap_folders']); - // set pagesize from config if (isset($CONFIG['pagesize'])) $IMAP->set_pagesize($CONFIG['pagesize']); @@ -224,6 +221,9 @@ function rcmail_set_imap_prop() if (!empty($CONFIG['imap_root'])) $IMAP->set_rootdir($CONFIG['imap_root']); + if (is_array($CONFIG['default_imap_folders'])) + $IMAP->set_default_mailboxes($CONFIG['default_imap_folders']); + if (!empty($_SESSION['mbox'])) $IMAP->set_mailbox($_SESSION['mbox']); if (isset($_SESSION['page'])) @@ -510,8 +510,10 @@ function rcmail_login($user, $pass, $host=NULL) $_SESSION['user_lang'] = $sess_user_lang; $_SESSION['password'] = encrypt_passwd($pass); - // force reloading complete list of subscribed mailboxes + // force reloading complete list of subscribed mailboxes + rcmail_set_imap_prop(); $IMAP->clear_cache('mailboxes'); + $IMAP->create_default_folders(); return TRUE; } |