GoLang imap_mailboxmsginfo

request it (161)
GoLang replacement for PHP's imap_mailboxmsginfo [edit | history]

Do you know a GoLang replacement for PHP's imap_mailboxmsginfo? Write it!

PHP imap_mailboxmsginfo

PHP original manual for imap_mailboxmsginfo [ show | php.net ]


(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.



An IMAP stream returned by imap_open().

Return Values

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.


Example #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";