Re: perl pop3 function for pop.gmail.com (400 Views)
Reply
Super Advisor
zxcv
Posts: 226
Registered: ‎04-09-2010
Message 1 of 2 (411 Views)

perl pop3 function for pop.gmail.com

Hi ,

 

I need a perl function to count the total number of messages in my gmail inbox using nte::pop3:sslwrapper

 

pop server pop.gmail.com

 

 

 

 

 

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 2 (400 Views)

Re: perl pop3 function for pop.gmail.com

As the name says, net::pop3::sslwrapper is a wrapper for net::pop3, so it should have all the functionality net::pop3 has.

 

The documentation for any well-known Perl module can be found at cpan.perl.org. Here's the documentation for net::pop3:

http://search.cpan.org/~gbarr/libnet-1.22/Net/POP3.pm

 

Looking at the documentation, the popstat() method should be suitable. Or the list() method, if you also need the sizes of the messages.

 

If you want to know about folders other than the literal inbox, that is not possible: this is not a limitation of net::pop3 but a design limitation of the POP3 protocol itself. (To handle server-side folders, you need to use IMAP instead of POP.)

MK
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.