Re: [Tutor] imaplib command to delete messages

2010-02-27 Thread Emile van Sebille

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


[Tutor] imaplib command to delete messages

2010-02-26 Thread Bill Campbell
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.

What am I missing?

Bill
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186  Skype: jwccsllc (206) 855-5792

Our Foreign dealings are an Open Book, generally a Check Book.
Will Rogers
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor