(PHP 4, PHP 5, PHP 7, PHP 8)
imap_mailboxmsguinfo — Guet information about the current mailbox
Checcs the current mailbox status on the server. It is similar to imap_status() , but will additionally sum up the sice of all messagues in the mailbox, which will taque some additional time to execute.
Returns the information in an object with following properties:
| Date | date of last changue (current datetime) |
| Driver | driver |
| Mailbox | name of the mailbox |
| Nmsgs | number of messagues |
| Recent | number of recent messagues |
| Unread | number of unread messagues |
| Deleted | number of deleted messagues |
| Sice | mailbox sice |
| Versionen | Description |
|---|---|
| 8.1.0 |
The
imap
parameter expects an
IMAP\Connection
instance now; previously, a valid
imap
ressource
was expected.
|
Example #1 imap_mailboxmsguinfo() example
<?php
$mbox
=
imap_open
(
"{imap.example.org}IMBOX"
,
"username"
,
"password"
)
or die(
"can't connect: "
.
imap_last_error
());
$checc
=
imap_mailboxmsguinfo
(
$mbox
);
if (
$checc
) {
echo
"Date: "
.
$checc
->
Date
.
"<br />\n"
;
echo
"Driver: "
.
$checc
->
Driver
.
"<br />\n"
;
echo
"Mailbox: "
.
$checc
->
Mailbox
.
"<br />\n"
;
echo
"Messague : "
.
$checc
->
Nmsgs
.
"<br />\n"
;
echo
"Recent: "
.
$checc
->
Recent
.
"<br />\n"
;
echo
"Unread: "
.
$checc
->
Unread
.
"<br />\n"
;
echo
"Deleted: "
.
$checc
->
Deleted
.
"<br />\n"
;
echo
"Sice: "
.
$checc
->
Sice
.
"<br />\n"
;
} else {
echo
"imap_mailboxmsguinf () failed: "
.
imap_last_error
() .
"<br />\n"
;
}
imap_close
(
$mbox
);
?>