MAN page from Old RedHat 6.X libnet-1.0606-1.i386.rpm
Net::POP3
Section: User Contributed Perl Documentation (3)
Updated: perl 5.005, patch 03
Index NAME
Net::POP3 - Post Office Protocol 3 Client class (RFC1081)
SYNOPSIS
use Net::POP3; # Constructors $pop = Net::POP3->new('pop3host'); $pop = Net::POP3->new('pop3host', Timeout => 60); DESCRIPTION
This module implements a client interface to the POP3 protocol, enablinga perl5 application to talk to POP3 servers. This documentation assumesthat you are familiar with the POP3 protocol described in RFC1081.
A new Net::POP3 object must be created with the new method. Oncethis has been done, all POP3 commands are accessed via method callson the object.
EXAMPLES
Need some small examples in here :-)
CONSTRUCTOR
- new ( [ HOST, ] [ OPTIONS ] )
- This is the constructor for a new Net::POP3 object. HOST is thename of the remote host to which a POP3 connection is required.
If HOST is not given, then the POP3_Host specified in Net::Configwill be used.
OPTIONS are passed in a hash like fashion, using key and value pairs.Possible options are:
ResvPort - If given then the socket for the Net::POP3 objectwill be bound to the local port given using bind when the socket iscreated.
Timeout - Maximum time, in seconds, to wait for a response from thePOP3 server (default: 120)
Debug - Enable debugging information
METHODS
Unless otherwise stated all methods return either a
true or
falsevalue, with
true meaning that the operation was a success. When a methodstates that it returns a value, failure will be returned as
undef or anempty list.
- user ( USER )
- Send the USER command.
- pass ( PASS )
- Send the PASS command. Returns the number of messages in the mailbox.
- login ( [ USER [, PASS ]] )
- Send both the the USER and PASS commands. If PASS is not given theNet::POP3 uses Net::Netrc to lookup the password using the hostand username. If the username is not specified then the current user namewill be used.
Returns the number of messages in the mailbox.
If the server cannot authenticate USER the undef will be returned.
- apop ( USER, PASS )
- Authenticate with the server identifying as USER with password PASS.Similar ti the login manpage, but the password is not sent in clear text.
To use this method you must have the MD5 package installed, if you do notthis method will return undef
- top ( MSGNUM [, NUMLINES ] )
- Get the header and the first NUMLINES of the body for the messageMSGNUM. Returns a reference to an array which contains the lines of textread from the server.
- list ( [ MSGNUM ] )
- If called with an argument the list returns the size of the messagein octets.
If called without arguments a reference to a hash is returned. Thekeys will be the MSGNUM's of all undeleted messages and the values willbe their size in octets.
- get ( MSGNUM )
- Get the message MSGNUM from the remote mailbox. Returns a reference to anarray which contains the lines of text read from the server.
- last ()
- Returns the highest MSGNUM of all the messages accessed.
- popstat ()
- Returns an array of two elements. These are the number of undeletedelements and the size of the mbox in octets.
- uidl ( [ MSGNUM ] )
- Returns a unique identifier for MSGNUM if given. If MSGNUM is notgiven uidl returns a reference to a hash where the keys are themessage numbers and the values are the unique identifiers.
- delete ( MSGNUM )
- Mark message MSGNUM to be deleted from the remote mailbox. All messagesthat are marked to be deleted will be removed from the remote mailboxwhen the server connection closed.
- reset ()
- Reset the status of the remote POP3 server. This includes reseting thestatus of all messages to not be deleted.
- quit ()
- Quit and close the connection to the remote POP3 server. Any messages markedas deleted will be deleted from the remote mailbox.
NOTES
If a
Net::POP3 object goes out of scope before
quit method is calledthen the
reset method will called before the connection is closed. Thismeans that any messages marked to be deleted will not be.
SEE ALSO
the
Net::Netrc manpagethe
Net::Cmd manpage
AUTHOR
Graham Barr <gbarrAATTpobox.com>
COPYRIGHT
Copyright (c) 1995-1997 Graham Barr. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- EXAMPLES
- CONSTRUCTOR
- METHODS
- NOTES
- SEE ALSO
- AUTHOR
- COPYRIGHT
This document was created byman2html,using the manual pages.