array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.imap-lsub.php', 1 => 'imap_lsub', 2 => 'List all the subscribed mailboxes', ), 'up' => array ( 0 => 'ref.imap.php', 1 => 'IMAP Functions', ), 'prev' => array ( 0 => 'function.imap-listsubscribed.php', 1 => 'imap_listsubscribed', ), 'next' => array ( 0 => 'function.imap-mail.php', 1 => 'imap_mail', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imap/functions/imap-lsub.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
imap_lsub — List all the subscribed mailboxes
Gets an array of all the mailboxes that you have subscribed.
imapreference
reference should normally be just the server
specification as described in imap_open()
Passing untrusted data to this parameter is insecure, unless imap.enable_insecure_rsh is disabled.
patternpattern:
'*' and '%'.
'*' means to return all mailboxes. If you pass
pattern as '*', you will
get a list of the entire mailbox hierarchy.
'%'
means to return the current level only.
'%' as the pattern
parameter will return only the top level
mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory.
Returns an array of all the subscribed mailboxes, or false on failure.
| Version | Description |
|---|---|
| 8.1.0 |
The imap parameter expects an IMAP\Connection
instance now; previously, a valid imap resource was expected.
|