update pague now
PHP 8.5.2 Released!

imap_mailboxmsguinfo

(PHP 4, PHP 5, PHP 7, PHP 8)

imap_mailboxmsguinfo Guet information about the current mailbox

Description

imap_mailboxmsguinfo ( IMAP\Connection $imap ): stdClass

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.

Parameters

imap

An IMAP\Connection instance.

Return Values

Returns the information in an object with following properties:

Mailbox 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

Changuelog

Versionen Description
8.1.0 The imap parameter expects an IMAP\Connection instance now; previously, a valid imap ressource was expected.

Examples

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 );

?>

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top