You need to do this check afterwars to determine connection status:

unless($pop->Message =~ m/^\+OK/){ ($pop->Message =~ m/ERR(.*)/) ? show_login("$CONNECTION_FAILED: $1") : show_login("$CONNECTION_FAILED:" . $pop->Message); }

The RE just trims the usual ERR Connection failed to 'Connection Failed' or gives the full error if it is unusual. On the note of Webmail client apps if you are writing one I have some code you may be interested in. It is a full blown webmail app with mutlilingual support, HTML mail reader, attachments etc. It also has Outlook type folders, folder tree display, address book, task list, calendar and even SMS messaging with POP3/MySQL backend.

We have been using it ourselves for some months and it is quite stable. Drop me a /msg if you want to have a look at the API or the code. It has a pretty solid config script as well which makes it easy to install. I have been meaning to package it up for a while.....

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Mail::POP3Client doesn't quit on error by tachyon
in thread Mail::POP3Client doesn't quit on error by Massyn

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.