Connection::POPX - Zero Knowledge Post Office Protocol
use Connection::POPX;
$pop = new Connection::POPX(); $pop = new Connection::POPX( User => $user );
Perl5.004+ Net::POP3 User::Base (Subclass)
Nothing
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.
#!/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();
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 );
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.
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.
Returns a list of the message number present on the remote server.
Returns the total number of messages waiting on the remote server.
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.
Return a list of all messages present on the remote server. If no messages
are presetn on the server, the undef
will be returned.
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.
Close the connection to remote POPX server.
None Present
Net::POP3, Connection::Base, User::Net, User::Nym, Message::MailMessage
Kris Smith <krissmi@zeroknowledge.com> Philippe McLean <phillipem@zeroknowledge.com>
Copyright 2000 Zero Knowledge Systems, Inc. All rights reserved