IMAP Функции
PHP Manual


(PHP 4, PHP 5, PHP 7)

imap_mailboxmsginfoGet information about the current mailbox


object imap_mailboxmsginfo ( resource $imap_stream )

Checks the current mailbox status on the server. It is similar to imap_status(), but will additionally sum up the size of all messages in the mailbox, which will take some additional time to execute.

Список параметров


Поток IMAP, полученный из imap_open().

Возвращаемые значения

Returns the information in an object with following properties:

Mailbox properties
Date date of last change (current datetime)
Driver driver
Mailbox name of the mailbox
Nmsgs number of messages
Recent number of recent messages
Unread number of unread messages
Deleted number of deleted messages
Size mailbox size

Returns FALSE on failure.


Пример #1 imap_mailboxmsginfo() example


      or die(
"can't connect: " imap_last_error());

$check imap_mailboxmsginfo($mbox);

if (
$check) {
"Date: "     $check->Date    "<br />\n" ;
"Driver: "   $check->Driver  "<br />\n" ;
"Mailbox: "  $check->Mailbox "<br />\n" ;
"Messages: " $check->Nmsgs   "<br />\n" ;
"Recent: "   $check->Recent  "<br />\n" ;
"Unread: "   $check->Unread  "<br />\n" ;
"Deleted: "  $check->Deleted "<br />\n" ;
"Size: "     $check->Size    "<br />\n" ;
} else {
"imap_mailboxmsginfo() failed: " imap_last_error() . "<br />\n";



IMAP Функции
PHP Manual