What about 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();
or this:
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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.