src/core/framework/core/3rdparty/ezcomponents/Mail/src/transports/imap/imap_transport.php
public function capability()
    {
        if ( $this->state != self::STATE_NOT_AUTHENTICATED &&
             $this->state != self::STATE_AUTHENTICATED &&
             $this->state != self::STATE_SELECTED &&
             $this->state != self::STATE_SELECTED_READONLY )
        {
            throw new ezcMailTransportException( "Trying to request capability when not connected to server." );
        }

        $tag = $this->getNextTag();
        $this->connection->sendData( "{$tag} CAPABILITY" );

        $response = $this->connection->getLine();
        while ( $this->responseType( $response ) != self::RESPONSE_UNTAGGED &&
                strpos( $response, '* CAPABILITY ' ) === false )
        {
            $response = $this->connection->getLine();
        }
        $result = trim( $response );

        $response = trim( $this->getResponse( $tag ) );
        if ( $this->responseType( $response ) != self::RESPONSE_OK )
        {
            throw new ezcMailTransportException( "The IMAP server responded negative to the CAPABILITY command: {$response}." );
        }

        return explode( ' ', str_replace( '* CAPABILITY ', '', $result ) );
    }
public function capability()
    {
        if ( $this->state != self::STATE_NOT_AUTHENTICATED &&
             $this->state != self::STATE_AUTHENTICATED &&
             $this->state != self::STATE_SELECTED &&
             $this->state != self::STATE_SELECTED_READONLY )
        {
            throw new ezcMailTransportException( "Trying to request capability when not connected to server." );
        }

        $tag = $this->getNextTag();
        $this->connection->sendData( "{$tag} CAPABILITY" );

        $response = $this->connection->getLine();
        while ( $this->responseType( $response ) != self::RESPONSE_UNTAGGED &&
                strpos( $response, '* CAPABILITY ' ) === false )
        {
            $response = $this->connection->getLine();
        }
        $result = trim( $response );

        $response = trim( $this->getResponse( $tag ) );
        if ( $this->responseType( $response ) != self::RESPONSE_OK )
        {
            throw new ezcMailTransportException( "The IMAP server responded negative to the CAPABILITY command: {$response}." );
        }

        return explode( ' ', str_replace( '* CAPABILITY ', '', $result ) );
    }
public function capability ( ) { if ( $ this -> state != self :: STATE_NOT_AUTHENTICATED && $ this -> state != self :: STATE_AUTHENTICATED && $ this -> state != self :: STATE_SELECTED && $ this -> state != self :: STATE_SELECTED_READONLY ) { throw new ezcMailTransportException ( "Trying to request capability when not connected to server." ) ; } $ tag = $ this -> getNextTag ( ) ; $ this -> connection -> sendData ( "{$tag} CAPABILITY" ) ; $ response = $ this -> connection -> getLine ( ) ; while ( $ this -> responseType ( $ response ) != self :: RESPONSE_UNTAGGED && strpos ( $ response , '* CAPABILITY ' ) === false ) { $ response = $ this -> connection -> getLine ( ) ; } $ result = trim ( $ response ) ; $ response = trim ( $ this -> getResponse ( $ tag ) ) ; if ( $ this -> responseType ( $ response ) != self :: RESPONSE_OK ) { throw new ezcMailTransportException ( "The IMAP server responded negative to the CAPABILITY command: {$response}." ) ; } return explode ( ' ' , str_replace ( '* CAPABILITY ' , '' , $ result ) ) ; }
Returns an array with the capabilities of the IMAP server.

The returned array will be something like this:
<code>
array( 'IMAP4rev1', 'SASL-IR SORT', 'THREAD=REFERENCES', 'MULTIAPPEND',
'UNSELECT', 'LITERAL+', 'IDLE', 'CHILDREN', 'NAMESPACE',
'LOGIN-REFERRALS'
);
</code>

Before calling this method, a connection to the IMAP server must be
established.

@throws ezcMailTransportException
if there was no connection to the server
or if the server sent a negative response
@return array(string)
Returns an array with the capabilities of the IMAP server .