What about this?
or this:use strict; use Mail::POP3Client; my $pop3 = new Mail::POP3Client(); # default is localhost $pop3->User( "somebody" ); $pop3->Pass( "doublesecret" ); $pop3->Connect() || die "failed: $pop3->Message()\n"; $pop3->Close();
use strict; use Mail::POP3Client; my $pop3 = new Mail::POP3Client( HOST => 'biztos.com' ); $pop3->User( "somebody" ); $pop3->Pass( "doublesecret" ); $pop3->Connect() || die "failed: $pop3->Message()\n"; $pop3->Close();
Update: I seem to recall having issues with the Connect method. Another thing you might try is:
use strict; use Mail::POP3Client; my $pop3 = new Mail::POP3Client(); # with & without the host $pop3->User( "somebody" ); $pop3->Pass( "doublesecret" ); $pop3->Connect(); if ($pop3->Alive()) { # connection established } else { # no connection } $pop3->Close();
2nd Update: The first two fail for me but the third works. I think that Mail::POP3Client has a bug in the Connect method now.
3rd Update: I downloaded the latest version of Mail::POP3Client from CPAN (AS had a very old version). Now all three work for me.
In reply to Re: Net::POP3 and Mail::POP3Client Weirdness - argh!
by Mr. Muskrat
in thread Net::POP3 and Mail::POP3Client Weirdness - argh!
by frostman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |