Archived Forum Post

Index of archived forum posts


MailMan2.DeleteEmail not working for Gmail (POP3)

Sep 04 '12 at 10:28

I'm running a bounce cleanup script against a Gmail POP3 account, and the DeleteEmail() method doesn't seem to be removing the email from the account. However, when I run my script again, it doesn't pick up the same emails again - it's as though Gmail knows a message has been accessed via POP3, but it's not getting deleted (I can still see it in the Gmail UI). Any ideas on why this is happening?


I think you need to change some gmail settings for this to work.


If the mailman.ImmediateDelete property is False, then make sure to call Pop3EndSession after all calls to DeleteMail have been made.

Also, it may be helpful to read these Chilkat posts about GMail:

Number of Messages in a POP3 Inbox

Understanding GMail's Behavior

GMail Settings for POP3 and IMAP Access