Hi everyone.
Today I'm trying to delete some emails from my email account and for some reason it's not deleting them. I'm using Mail::POP3 to connect and everything looks good except for deleting emails. It does connect and prints out the header and body of my emails so I know it's making contact with the server.
foreach my $to_delete (@ids)
{
$to_delete =~ s/Message\-id:\s+//i;
$to_delete =~ s/<//g;
$to_delete =~ s/>//g;
print "trying to delete $to_delete<br>";
$pop->Delete($to_delete);
}
$pop->Close();
Below is what I get on my output. The first two lines are what is read from the script. I have two emails in my email account with the IDs it mentions. The second two lines are the ouput of what it is trying to delete. After every time I run the script the email IDs stay the same but the emails never delete.
I did some hacking by removing the Message-ID: from the message-id line pulled back by the module. I also removed the <>s just in case. None of these had any affect on the deletion of emails.
Message-ID: <0016e646069637dafe049ec66ea8@google.com>
Message-ID: <90e6ba3fd257d1d9da049ec67ca9@google.com>
trying to delete 0016e646069637dafe049ec66ea8@google.com
trying to delete 90e6ba3fd257d1d9da049ec67ca9@google.com
Can someone help me?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.