On 2/26/2010 11:48 AM Bill Campbell said...
I've written a script to go through varions Sent folders on
IMAP servers to archive the messages on a central server using
imaplib to do the heavy lifting. Perhaps I'm a bit thick, but I
have not been able to figure out how to delete messages in the
folders after processing them. The imaplib documentation as lots
of ways to delete mailboxes (folders) and expunge messages from
folders, but I don't see anything about marking individual
messages as deleted.
I can't confirm it's still current, but this tip from Donn Cave might help:
It's only a flag, to identify the message that as you noted
will be actually deleted later by an expunge.
ok, error = imapobject.store(number, 'FLAGS', '(\Deleted)')
(from
http://groups.google.com/group/comp.lang.python/browse_thread/thread/dfd041398e86c1fd/884359798ce1e025?q=python+imaplib+delete+message)
Emile
What am I missing?
Bill
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor