deleting IMAP messages using imaplib

Donn Cave donn at oz.net
Tue Mar 13 18:09:03 EST 2001


Quoth "Gary" <garyl at directhit.com>:
| Can anyone tell me how to delete messages in an IMAP mailbox? The doc says
| delete is used to delete a mailbox, while expunge is used to clear out
| deleted items. How do I delete a message itself?

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)')

	Donn Cave, donn at oz.net



More information about the Python-list mailing list