src/core/framework/core/3rdparty/ezcomponents/Mail/src/transports/imap/imap_transport.php
public function status( &$numMessages, &$sizeMessages, &$recent = 0, &$unseen = 0 )
    {
        if ( $this->state != self::STATE_SELECTED &&
             $this->state != self::STATE_SELECTED_READONLY )
        {
            throw new ezcMailTransportException( "Can't call status() on the IMAP transport when a mailbox is not selected." );
        }
        $messages = $this->listMessages();
        $numMessages = count( $messages );
        $sizeMessages = array_sum( $messages );
        $messages = array_keys( $messages );
        $recentMessages = array_intersect( $this->searchByFlag( "RECENT" ), $messages );
        $unseenMessages = array_intersect( $this->searchByFlag( "UNSEEN" ), $messages );
        $recent = count( $recentMessages );
        $unseen = count( $unseenMessages );
        return true;
    }
public function status( &$numMessages, &$sizeMessages, &$recent = 0, &$unseen = 0 )
    {
        if ( $this->state != self::STATE_SELECTED &&
             $this->state != self::STATE_SELECTED_READONLY )
        {
            throw new ezcMailTransportException( "Can't call status() on the IMAP transport when a mailbox is not selected." );
        }
        $messages = $this->listMessages();
        $numMessages = count( $messages );
        $sizeMessages = array_sum( $messages );
        $messages = array_keys( $messages );
        $recentMessages = array_intersect( $this->searchByFlag( "RECENT" ), $messages );
        $unseenMessages = array_intersect( $this->searchByFlag( "UNSEEN" ), $messages );
        $recent = count( $recentMessages );
        $unseen = count( $unseenMessages );
        return true;
    }
public function status ( & $ numMessages , & $ sizeMessages , & $ recent = 0 , & $ unseen = 0 ) { if ( $ this -> state != self :: STATE_SELECTED && $ this -> state != self :: STATE_SELECTED_READONLY ) { throw new ezcMailTransportException ( "Can't call status() on the IMAP transport when a mailbox is not selected." ) ; } $ messages = $ this -> listMessages ( ) ; $ numMessages = count ( $ messages ) ; $ sizeMessages = array_sum ( $ messages ) ; $ messages = array_keys ( $ messages ) ; $ recentMessages = array_intersect ( $ this -> searchByFlag ( "RECENT" ) , $ messages ) ; $ unseenMessages = array_intersect ( $ this -> searchByFlag ( "UNSEEN" ) , $ messages ) ; $ recent = count ( $ recentMessages ) ; $ unseen = count ( $ unseenMessages ) ; return true ; }
Returns information about the messages in the current mailbox.

The information returned through the parameters is:
- $numMessages = number of not deleted messages in the selected mailbox
- $sizeMessages = sum of the not deleted messages sizes
- $recent = number of recent and not deleted messages
- $unseen = number of unseen and not deleted messages

Before calling this method, a connection to the IMAP server must be
established and a user must be authenticated successfully, and a mailbox
must be selected.

Example of returning the status of the currently selected mailbox:
<code>
$imap = new ezcMailImapTransport( 'imap.example.com' );
$imap->authenticate( 'username', 'password' );
$imap->selectMailbox( 'Inbox' );

$imap->status( $numMessages, $sizeMessages, $recent, $unseen );
</code>

After running the above code, $numMessages, $sizeMessages, $recent
and $unseen will be populated with values.

@throws ezcMailTransportException
if a mailbox is not selected
or if the server sent a negative response
@param int &$numMessages
@param int &$sizeMessages
@param int &$recent
@param int &$unseen
@return bool
Returns information about the messages in the current mailbox .