develooper Front page | perl.libnet | Postings from July 2003

Net::POP3

From:
Lev Altshuler
Date:
July 6, 2003 19:13
Subject:
Net::POP3
Message ID:
001501c342f5$a9620560$3c593141@bloor.phub.net.cable.rogers.com
Hello,

I am trying to count email messages in the mailbox and read their headers.
In case that there are some messages on the POP3 server and
they haven't yet got to the Inbox, I get a number of messages.
As soon as they have been in the Inbox, I get '0E0' as a number of messages.
What feature of Net::POP3 am I unaware of, or
where did I screw up in the code?

use Net::POP3;

my $server = "pop.bloor.phub.net.cable.rogers.com";
my $pop3 = Net::POP3->new($server, Timeout => 10, Debug =>1);
die "Couldn't log on to server" unless $pop3;

my $user = "levalt\@rogers.com";
my $password = "password";
my $num_Messages = $pop3->login($user, $password);
print "$num_Messages\n";

Thanks, Lev




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About