<HTML ><HEAD ><TITLE >imap_mailboxmsginfo</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="IMAP, POP3 and NNTP functions" HREF="ref.imap.html"><LINK REL="PREVIOUS" TITLE="imap_mail" HREF="function.imap-mail.html"><LINK REL="NEXT" TITLE="imap_mime_header_decode" HREF="function.imap-mime-header-decode.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.imap-mail.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.imap-mime-header-decode.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.imap-mailboxmsginfo" ></A >imap_mailboxmsginfo</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN38554" ></A ><P > (PHP 3>= 3.0.2, PHP 4 )</P >imap_mailboxmsginfo -- Get information about the current mailbox</DIV ><DIV CLASS="refsect1" ><A NAME="AEN38557" ></A ><H2 >Description</H2 >object <B CLASS="methodname" >imap_mailboxmsginfo</B > ( resource imap_stream)<BR ></BR ><P > Returns information about the current mailbox. Returns <TT CLASS="constant" ><B >FALSE</B ></TT > on failure. </P ><P > The <B CLASS="function" >imap_mailboxmsginfo()</B > function checks the current mailbox status on the server. It is similar to <A HREF="function.imap-status.html" ><B CLASS="function" >imap_status()</B ></A >, but will additionally sum up the size of all messages in the mailbox, which will take some additional time to execute. It returns the information in an object with following properties. </P ><P > <DIV CLASS="table" ><A NAME="AEN38571" ></A ><P ><B >Table 1. Mailbox properties</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Date</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >date of last change</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Driver</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >driver</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Mailbox</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >name of the mailbox</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Nmsgs</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >number of messages</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Recent</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >number of recent messages</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Unread</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >number of unread messages</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Deleted</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >number of deleted messages</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >Size</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >mailbox size</TD ></TR ></TBODY ></TABLE ></DIV > </P ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN38600" ></A ><P ><B >Example 1. <B CLASS="function" >imap_mailboxmsginfo()</B > example</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="php" ><?php $mbox = imap_open("{your.imap.host}INBOX","username", "password") or die("can't connect: ".imap_last_error()); $check = imap_mailboxmsginfo($mbox); if($check) { print "Date: " . $check->Date ."<br>\n" ; print "Driver: " . $check->Driver ."<br>\n" ; print "Mailbox: " . $check->Mailbox ."<br>\n" ; print "Messages: ". $check->Nmsgs ."<br>\n" ; print "Recent: " . $check->Recent ."<br>\n" ; print "Unread: " . $check->Unread ."<br>\n" ; print "Deleted: " . $check->Deleted ."<br>\n" ; print "Size: " . $check->Size ."<br>\n" ; } else { print "imap_check() failed: ".imap_last_error(). "<br>\n"; } imap_close($mbox); ?></PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.imap-mail.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.imap-mime-header-decode.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >imap_mail</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.imap.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >imap_mime_header_decode</TD ></TR ></TABLE ></DIV ></BODY ></HTML >