array imap_listsubscribed
(int imap_stream, string ref, string pattern);Returns an array of all the mailboxes that you have subscribed. The ref and pattern arguments specify the base location to search from and the pattern the mailbox name must match.