Документ взят из кэша поисковой машины. Адрес оригинального документа : http://old.master.cmc.msu.ru/php/function.imap-listmailbox.html
Дата изменения: Sun Feb 3 22:42:04 2002
Дата индексирования: Tue Oct 2 10:30:10 2012
Кодировка:
imap_listmailbox

imap_listmailbox

(PHP 3 <= 3.0.18, PHP 4 >= 4.0.0)

imap_listmailbox -- Read the list of mailboxes

Description

array imap_listmailbox ( int imap_stream, string ref, string pattern)

Returns an array containing the names of the mailboxes. See imap_getmailboxes() for a description of ref and pattern.

Example 1. imap_listmailbox() example

$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
      or die("can't connect: ".imap_last_error());
 
$list = imap_listmailbox($mbox,"{your.imap.host}","*");
if(is_array($list)) {
  reset($list);
  while (list($key, $val) = each($list))
    print imap_utf7_decode($val)."<br>\n";
} else
  print "imap_listmailbox failed: ".imap_last_error()."\n";
 
imap_close($mbox);