NAME

Connection::POPX - Zero Knowledge Post Office Protocol


SYNOPSIS

    use Connection::POPX;

    $pop = new Connection::POPX();
    $pop = new Connection::POPX( User => $user );


REQUIRES

    Perl5.004+
    Net::POP3
    User::Base (Subclass)


EXPORTS

Nothing


DESCRIPTION

This is the POP protocol encapsulation class. This class implements a client interface to the POP2/POP3/POPZ (Zero Knowledge) protocols enabling perl applications to talk to POP servers. This implementation assumes that you are familiar with the concepts of the POP family of protocols described in RFC937, RFC1225 and the Zero Knowledge POP protocol description document.

The Connection::POPX object must be created with the new method. Once this has been done, all POPX commands are accessed through this object.

The Connection::POPX class is subclass of Connection::Base.


EXAMPLE

    #!/usr/bin/perl C<-w>

    use User::Net;
    use Connection::POPX;

    $user = new User::Net();
    $pop = new Connection::POPX();

    $pop->connect( $user );
    $count = $pop->msg_count( $message );
    if ( $count > 0 ) {
        $messages = $pop->get_msgs();
    }
    $pop->quit();


CONSTRUCTOR

new Connection::POPX( [ USER ] )

This is the constructor for the Connection::POPX object. USER is the user for authentication to the server. The USER parameter is one of the sub-classes of the User::Base hiearchy and is optional.

Constructor options must be passed in a hash-like fashion, using key and value pairs.

Example:

  $pop = new Connection::POPX( User => $server );


METHODS

connect ( [ USER ] )

Open the connection to the remote POPX server. If USER was not specified at object creaton then they must be provided for successful connection to the remote server. USER is one of the sub-classes of User::Base class hiearchy.

user ( USER )

Returns the user object associated with this POPX server connection. If USER is supplied, then it wil be used for future connections, but will not affect the current news server connection.

msg_list ()

Returns a list of the message number present on the remote server.

msg_count ()

Returns the total number of messages waiting on the remote server.

empty_box ()

Removes all messages from the remote server. The actual deletion of the messages does not take place until the connection to the server is closed, therefore the SAME messages will remain on the server after a fatal error in message processing implicitly closes the connection.

get_msgs ()

Return a list of all messages present on the remote server. If no messages are presetn on the server, the undef will be returned.

poll_msgs ( [ TIMEOUT ] [, RETRIES] )

Same as get_msgs, but waits for messages to appear on the server instead of returning undef when none are present. TIMEOUT and <RETRIES>, if supplied will alter the default message waiting period.

quit()

Close the connection to remote POPX server.


CLASS VARIABLES

None Present


SEE ALSO

Net::POP3, Connection::Base, User::Net, User::Nym, Message::MailMessage


AUTHOR

Kris Smith <krissmi@zeroknowledge.com> Philippe McLean <phillipem@zeroknowledge.com>


COPYRIGHT

Copyright 2000 Zero Knowledge Systems, Inc. All rights reserved