diff options
-rw-r--r-- | Net/POP3.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Net/POP3.pm b/Net/POP3.pm index 3263f47..7cd44ef 100644 --- a/Net/POP3.pm +++ b/Net/POP3.pm @@ -13,7 +13,7 @@ use Net::Cmd; use Carp; use Net::Config; -$VERSION = "2.24"; # $Id: //depot/libnet/Net/POP3.pm#23 $ +$VERSION = "2.24"; # $Id: //depot/libnet/Net/POP3.pm#24 $ @ISA = qw(Net::Cmd IO::Socket::INET); @@ -373,6 +373,17 @@ Net::POP3 - Post Office Protocol 3 Client class (RFC1939) $pop = Net::POP3->new('pop3host'); $pop = Net::POP3->new('pop3host', Timeout => 60); + if ($pop->login($username, $password) > 0) { + my $msgnums = $pop->list; # hashref of msgnum => size + foreach my $msgnum (keys %$msgnums) { + my $msg = $pop->get($msgnum); + print @$msg; + $pop->delete($msgnum); + } + } + + $pop->quit; + =head1 DESCRIPTION This module implements a client interface to the POP3 protocol, enabling @@ -383,10 +394,6 @@ A new Net::POP3 object must be created with the I<new> method. Once this has been done, all POP3 commands are accessed via method calls on the object. -=head1 EXAMPLES - - Need some small examples in here :-) - =head1 CONSTRUCTOR =over 4 @@ -540,6 +547,6 @@ it under the same terms as Perl itself. =for html <hr> -I<$Id: //depot/libnet/Net/POP3.pm#23 $> +I<$Id: //depot/libnet/Net/POP3.pm#24 $> =cut |