public function listUniqueIdentifiers( $msgNum = null )
    {
        if ( $this->state != self::STATE_TRANSACTION )
        {
            throw new ezcMailTransportException( "Can't call ListUniqueIdentifiers() on the POP3 transport when not successfully logged in." );
        }

        // send the command
        $result = array();
        if ( $msgNum !== null )
        {
            $this->connection->sendData( "UIDL {$msgNum}" );
            $response = $this->connection->getLine( true );
            if ( $this->isPositiveResponse( $response ) )
            {
                // get the single response line from the server
                list( $dummy, $num, $id ) = explode( ' ', $response );
                $result[(int)$num] = $id;
            }
            else
            {
                throw new ezcMailTransportException( "The POP3 server sent a negative response to the UIDL command: {$response}." );
            }
        }
        else
        {
            $this->connection->sendData( "UIDL" );
            $response = $this->connection->getLine();
            if ( $this->isPositiveResponse( $response ) )
            {
                // fetch each of the result lines and add it to the result
                while ( ( $response = $this->connection->getLine( true ) ) !== "." )
                {
                    list( $num, $id ) = explode( ' ', $response );
                    $result[(int)$num] = $id;
                }
            }
            else
            {
                throw new ezcMailTransportException( "The POP3 server sent a negative response to the UIDL command: {$response}." );
            }
        }
        return $result;
    }
public function listUniqueIdentifiers( $msgNum = null )
    {
        if ( $this->state != self::STATE_TRANSACTION )
        {
            throw new ezcMailTransportException( "Can't call ListUniqueIdentifiers() on the POP3 transport when not successfully logged in." );
        }

        // send the command
        $result = array();
        if ( $msgNum !== null )
        {
            $this->connection->sendData( "UIDL {$msgNum}" );
            $response = $this->connection->getLine( true );
            if ( $this->isPositiveResponse( $response ) )
            {
                // get the single response line from the server
                list( $dummy, $num, $id ) = explode( ' ', $response );
                $result[(int)$num] = $id;
            }
            else
            {
                throw new ezcMailTransportException( "The POP3 server sent a negative response to the UIDL command: {$response}." );
            }
        }
        else
        {
            $this->connection->sendData( "UIDL" );
            $response = $this->connection->getLine();
            if ( $this->isPositiveResponse( $response ) )
            {
                // fetch each of the result lines and add it to the result
                while ( ( $response = $this->connection->getLine( true ) ) !== "." )
                {
                    list( $num, $id ) = explode( ' ', $response );
                    $result[(int)$num] = $id;
                }
            }
            else
            {
                throw new ezcMailTransportException( "The POP3 server sent a negative response to the UIDL command: {$response}." );
            }
        }
        return $result;
    }
public function listUniqueIdentifiers ( $ msgNum = null ) { if ( $ this -> state != self :: STATE_TRANSACTION ) { throw new ezcMailTransportException ( "Can't call ListUniqueIdentifiers() on the POP3 transport when not successfully logged in." ) ; } // send the command $ result = array ( ) ; if ( $ msgNum !== null ) { $ this -> connection -> sendData ( "UIDL {$msgNum}" ) ; $ response = $ this -> connection -> getLine ( true ) ; if ( $ this -> isPositiveResponse ( $ response ) ) { // get the single response line from the server list ( $ dummy , $ num , $ id ) = explode ( ' ' , $ response ) ; $ result [ ( int ) $ num ] = $ id ; } else { throw new ezcMailTransportException ( "The POP3 server sent a negative response to the UIDL command: {$response}." ) ; } } else { $ this -> connection -> sendData ( "UIDL" ) ; $ response = $ this -> connection -> getLine ( ) ; if ( $ this -> isPositiveResponse ( $ response ) ) { // fetch each of the result lines and add it to the result while ( ( $ response = $ this -> connection -> getLine ( true ) ) !== "." ) { list ( $ num , $ id ) = explode ( ' ' , $ response ) ; $ result [ ( int ) $ num ] = $ id ; } } else { throw new ezcMailTransportException ( "The POP3 server sent a negative response to the UIDL command: {$response}." ) ; } } return $ result ; }
Returns the unique identifiers for messages on the POP3 server.

You can fetch the unique identifier for a specific message by providing
the $msgNum parameter.

The unique identifier can be used to recognize mail from servers
between requests. In contrast to the message numbers the unique numbers
assigned to an email usually never changes.

Note: POP3 servers are not required to support this command and it may fail.

The format of the returned array is:
<code>
array( message_num => unique_id );
</code>

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

Example:
<code>
array( 1 => '000001fc4420e93a', 2 => '000001fd4420e93a' );
</code>

@throws ezcMailTransportException
if there was no connection to the server
or if not authenticated
or if the server sent a negative response
@param int $msgNum
@return array(string)
Returns the unique identifiers for messages on the POP3 server .