I ran your code in the debugger and did get a proper count, but first I got this:

main::(geemail.pl:15): my $port ='995'; DB<2> main::(geemail.pl:17): my $pop = new Mail::POP3Client( main::(geemail.pl:18): USER => $username, main::(geemail.pl:19): PASSWORD => $password, main::(geemail.pl:20): HOST => $mailhost, main::(geemail.pl:21): PORT => $port, main::(geemail.pl:22): USESSL => 'true', main::(geemail.pl:23): DEBUG => 0, main::(geemail.pl:24): ); DB<2> ******************************************************************* Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER together with SSL_ca_file|SSL_ca_path for verification. If you really don't want to verify the certificate and keep the connection open to Man-In-The-Middle attacks please set SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. ******************************************************************* at C:/strawberry/perl/site/lib/Mail/POP3Client.pm line 376. at C:/strawberry/perl/vendor/lib/IO/Socket/SSL.pm line 312. IO::Socket::SSL::configure_SSL('IO::Socket::SSL=GLOB(0x3b909d0 +)', 'HASH(0x2adc148)') called at C:/strawberry/perl/vendor/lib/IO/Soc +ket/SSL.pm line 264 IO::Socket::SSL::configure('IO::Socket::SSL=GLOB(0x3b909d0)', +'HASH(0x2adc148)') called at C:/strawberry/perl/lib/IO/Socket.pm line + 49 IO::Socket::new('IO::Socket::SSL', 'Proto', 'tcp', 'PeerAddr', + 'pop.gmail.com', 'Type', 1, 'PeerPort', 995, ...) called at C:/straw +berry/perl/vendor/lib /IO/Socket/IP.pm line 331 IO::Socket::IP::new('IO::Socket::SSL', 'PeerAddr', 'pop.gmail. +com', 'PeerPort', 995, 'Proto', 'tcp', 'Type', 1, ...) called at C:/s +trawberry/perl/site/l ib/Mail/POP3Client.pm line 376 Mail::POP3Client::Connect('Mail::POP3Client=HASH(0x3b8f088)') +called at C:/strawberry/perl/site/lib/Mail/POP3Client.pm line 79

So, for me it worked at the next step

DB<2> l 26==> if (($pop->Count()) < 1) 27 { 28: print "I Can't get pop count"; 29: exit; 30 } 31 DB<2> p $pop->Count() 320 DB<3>
but definitely hints at potential snags in the network/security configuration arena.


In reply to Re: how to read the Gmail Inbox using pop3client module? by jakeease
in thread how to read the Gmail Inbox using pop3client module? by vasanthgk91

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.