Imap_listmailbox
Gets the mailbox listing.
Syntax: array imap_listmailbox (int stream_id, string ref, String pattern);
return value: Array
Function type: http://www.aliyun.com/zixun/aggregation/32416.html "> network system
Content Description
This function gets a mailbox listing. Parameter Imap_stream for IMAP 5643.html "> code. Parameter ref is typically an IMAP server name, as the following example. The parameter pattern can be used as a universal character * to represent all the paths, aayawa@yahoo.com and indicates (27-apr-1999) if this parameter is substituting "" (null character), the data will not be returned.
Usage examples
This example is alank@shermanloan.com in 02-jun-1999.
<?php
$Account = "myID";
$Password = "MYPASSWD";
$mailbox = Imap_open ("{Mail.xyz.com:143}inbox", $Account, $Password);
if ($mailbox) {
$mailboxes = Imap_listmailbox ($mailbox, "{mail.xyz.com:143}", "*");
for ($index = 0; $index < count ($mailboxes); $index + +) {
Print ($mailboxes [$index]. "\ n");
}
Imap_close ($mailbox);
else {
Print ("Unable to/font>} open $Account mailbox. \ n");
}
?>