Net::POP3 vs Mail::Transport::POP3 problem

"TOPCHYAN AVETIK S. (NAT1AST)" <[email protected]> Fri, 7 May 2004 12:38:28 -0400
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <[email protected]>
I use ver. '2.054' on Win2K with ActiveState Perl 5.8.3.

When I try to run this script ...

=============
use Net::POP3;
use warnings;
use strict;

my $host = 'pop.bar.baz.com';
my $uid  = 'foo';
my $pass = 'bar';

my $pop = Net::POP3->new($host) || die $!;

my $rv = $pop->login($uid, $pass) || die "Cannot Login: $!\n";
my $list = $pop->list();
for (keys %{$pop->list}) {
  print "@{$pop->top($_)}", "\n"x2;
}
=============

It works as expected, printing me headers of messages. (don't want to
reproduce them here).


But when I try to run similar script using Mail::Transport::POP3 ...

=====================
use Mail::Transport::POP3;
use warnings;
use strict;

my $host = 'pop.bar.baz.com';
my $uid  = 'foo';
my $pass = 'bar';

my $receiver = Mail::Transport::POP3->new(
    hostname => $host,
    username => $uid,
    password => $pass
) || die "Cannot create transport $!\n";
============================


I get this error:

>perl test_mailbox.pl
ERROR: Could not authenticate using any login method
Cannot create transport Bad file descriptor
>Exit code: 9    Time: 0.413

I know, I probably shouldn't use it directly, but per documentation I can
still do it, 
and, actually, ::Manager, ::Box::POP3 give me same kinds of errors.

Any ideas what may be wrong?

Thanks.
Avetik Topchyan.