Example #1
0
 function list_mailboxes($args)
 {
     $rcmail = rcmail::get_instance();
     if (!$rcmail->config->get('use_subscriptions', true)) {
         $args['folders'] = iil_C_ListMailboxes($rcmail->imap->conn, $rcmail->imap->mod_mailbox($args['root']), $args['filter']);
     }
     return $args;
 }
Example #2
0
 /**
  * Create all folders specified as default
  */
 function create_default_folders()
 {
     $a_folders = iil_C_ListMailboxes($this->conn, $this->mod_mailbox(''), '*');
     $a_subscribed = iil_C_ListSubscribed($this->conn, $this->mod_mailbox(''), '*');
     // create default folders if they do not exist
     foreach ($this->default_folders as $folder) {
         $abs_name = $this->mod_mailbox($folder);
         if (!in_array_nocase($abs_name, $a_folders)) {
             $this->create_mailbox($folder, TRUE);
         } else {
             if (!in_array_nocase($abs_name, $a_subscribed)) {
                 $this->subscribe($folder);
             }
         }
     }
 }