Net::POP3

[email protected] ("Lev Altshuler") Sat, 5 Jul 2003 23:02:16 +1000
Newsgroups perl.libnet
Message-ID <[email protected]>
------=_NextPart_000_0012_01C34349.7AB287E0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

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

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

Thanks, Lev


------=_NextPart_000_0012_01C34349.7AB287E0
Content-Type: text/html;
	charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Hello,</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>I am trying to count email messages in the mailbox and read their=20
headers.<BR>In case that there are some messages on the POP3 server =
and<BR>they=20
haven't yet got to the Inbox, I get a number of messages.<BR>As soon as =
they=20
have been in the Inbox, I get '0E0' as a number of messages.<BR>What =
feature of=20
Net::POP3 am I unaware of, or<BR>where did I screw up in the =
code?<BR><BR>use=20
Net::POP3;<BR><BR>my $server =3D =
"pop.bloor.phub.net.cable.rogers.com";<BR>my=20
$pop3 =3D Net::POP3-&gt;new($server, Timeout =3D&gt; 10, Debug =
=3D&gt;1);<BR>die=20
"Couldn't log on to server" unless $pop3;<BR><BR>my $user =3D=20
"levalt\@rogers.com";<BR>my $password =3D "password";<BR>my =
$num_Messages =3D=20
$pop3-&gt;login($user, $password);<BR>print "$num_Messages\n";</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks, Lev<BR></DIV></BODY></HTML>

------=_NextPart_000_0012_01C34349.7AB287E0--