use Net::POP3; # Constructors $pop = Net::POP3->new('pop3host'); $pop = Net::POP3->new('pop3host', Timeout => 60);
A new Net::POP3 object must be created with the new method. Once this has been done, all POP3 commands are accessed via method calls on the object.
Need some small examples in here :-)
HOST
is the name of the remote host to which a
POP3 connection is required.
If HOST
is not given, then the POP3_Host
specified in Net::Config
will be used.
OPTIONS
are passed in a hash like fashion, using key and value pairs. Possible
options are:
Timeout - Maximum time, in seconds, to wait for a response from the POP3 server (default: 120)
Debug - Enable debugging information
PASS
is not given the
Net::POP3
uses Net::Netrc
to lookup the password using the host and username. If the username is not
specified then the current user name will be used.
Returns the number of messages in the mailbox.
NUMLINES
of the body for the message
MSGNUM
. Returns a reference to an array which contains the lines of text read
from the server.
If called without arguments a reference to a hash is returned. The keys
will be the MSGNUM
's of all undeleted messages and the values will be their size in octets.
MSGNUM
from the remote mailbox. Returns a reference to an array which contains the
lines of text read from the server.
MSGNUM
of all the messages accessed.
MSGNUM
to be deleted from the remote mailbox. All messages that are marked to be
deleted will be removed from the remote mailbox when the server connection
closed.
Net::POP3
object goes out of scope before quit method is called then the reset method will called before the connection is closed. This means that any
messages marked to be deleted will not be.