imap_listmailbox
获取邮箱列示。 
语法: array imap_listmailbox(int stream_id, string ref, string pattern); 
返回值: 数组 
函数种类: 网络系统 
 本函数可获得邮箱列示。参数 imap_stream 为 IMAP 的代号。参数 ref 通常为 IMAP 服务器名称,参考下例。参数 pattern 可用万用字符 * 代表全部的路径,aayawa@yahoo.com 并指出 (27-Apr-1999) 若本参数以 "" (空字符) 代入,不会返回资料。 
 
本例为 alank@shermanloan.com 于 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("无法?/font>}启 $Account 的信箱.\n"); } ?>
 
   |