Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I don't know if this is a problem with gmail's POP3 service or the Net::POP3 (and Net::POP3::SSLWrapper) module, or some devilish combination of the two.

I have a gmail account, foo@gmail.com, that has POP3 enabled for all email, and the option for "delete gmail's copy of the email" is set.

And yet, when I run the code below, the message is not deleted. No error message is available (as far as I know). Has anyone had a similar problem with a home-grown gmail POP3 program?
use Net::POP3::SSLWrapper; use strict; use warnings; pop3s { my $pop = Net::POP3->new('pop.gmail.com', Port => 995) or die "can't + make pop3 connection: $!"; my $nm = $pop->login('foo@gmail.com', 'password'); my $msgs = $pop->list; while (my ($id, $data) = each %$msgs) { print "Message ID: $id\n"; $pop->delete($id); } }; __END__ Here is actual output: [root@XBASEBK1 popgrabber]# perl jxp.pl Messages: 4 Message ID: 4 Message ID: 1 Message ID: 3 Message ID: 2 [root@XBASEBK1 popgrabber]# perl jxp.pl Messages: 4 Message ID: 4 Message ID: 1 Message ID: 3 Message ID: 2 [root@XBASEBK1 popgrabber]# perl jxp.pl Messages: 4 Message ID: 4 Message ID: 1 Message ID: 3 Message ID: 2
Any ideas?

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
Nos autem praedicamus Christum crucifixum (1 Cor. 1:23) - The Cross Reference (My Blog)

In reply to gmail pop3 message deletion bug? by japhy

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-05-22 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (79 votes). Check out past polls.

    Notices?