Mail_IMAP::getMailboxes()

bool getMailboxes([str $host = NULL[, str $pattern = "*" [, bool $rtn = TRUE]]])

Gets a list of the folders on the server using imap_list.

The host information is automatically indexed in the $mailboxInfo property as $mailboxInfo["host"] if a URI abstraction was used to make a connection. The $pattern argument can be used to search for specific mailboxes, see imap_list for possible syntax. All folders on the server are returned by default.

If the $rtn argument is FALSE, the information retrieved from imap_list is merged into the $mailboxInfo property.

Method summary:

param str $folder (optional) See above.
param str $pattern (optional) See above.
param bool $rtn (optional) See above.
return bool
throws ErrorStack: Supplied host is not valid. There is a problem with the host name provided.
throws ErrorStack: Cannot fetch mailbox names. The call to imap_list failed.
access public
see imap_list
Execution time: 0.12 seconds