public function expunge()
    {
        if ( $this->state != self::STATE_SELECTED )
        {
            throw new ezcMailTransportException( "Can not issue EXPUNGE command if a mailbox is not selected." );
        }

        $tag = $this->getNextTag();
        $this->connection->sendData( "{$tag} EXPUNGE" );
        $response = trim( $this->getResponse( $tag ) );
        if ( $this->responseType( $response ) != self::RESPONSE_OK )
        {
            throw new ezcMailTransportException( "EXPUNGE failed: {$response}." );
        }
    }
public function expunge()
    {
        if ( $this->state != self::STATE_SELECTED )
        {
            throw new ezcMailTransportException( "Can not issue EXPUNGE command if a mailbox is not selected." );
        }

        $tag = $this->getNextTag();
        $this->connection->sendData( "{$tag} EXPUNGE" );
        $response = trim( $this->getResponse( $tag ) );
        if ( $this->responseType( $response ) != self::RESPONSE_OK )
        {
            throw new ezcMailTransportException( "EXPUNGE failed: {$response}." );
        }
    }
public function expunge ( ) { if ( $ this -> state != self :: STATE_SELECTED ) { throw new ezcMailTransportException ( "Can not issue EXPUNGE command if a mailbox is not selected." ) ; } $ tag = $ this -> getNextTag ( ) ; $ this -> connection -> sendData ( "{$tag} EXPUNGE" ) ; $ response = trim ( $ this -> getResponse ( $ tag ) ) ; if ( $ this -> responseType ( $ response ) != self :: RESPONSE_OK ) { throw new ezcMailTransportException ( "EXPUNGE failed: {$response}." ) ; } }
Sends an EXPUNGE command to the server.

This method permanently deletes the messages marked for deletion by
the method {@link delete()}.

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.

@throws ezcMailTransportException
if a mailbox was not selected
or if the server sent a negative response
Sends an EXPUNGE command to the server .