setting email FLAGs in IMAP4 box

Christian Rothe crothe at zes.com
Wed Feb 11 07:50:49 CET 2004


Many thanks!! What a fool I am. Now it works

Christian

"Tony Meyer" <t-meyer at ihug.co.nz> wrote in message news:<mailman.1438.1076450070.12720.python-list at python.org>...
> >      imap = imaplib.IMAP4("hostname")
> >      imap.login("name","passwd")
> >      imap.select("INBOX",1)
> >      imap.store(1, 'FLAGS', '(\Deleted)')
> 
> You're selecting the INBOX folder as read-only, which means that you can't
> write any changes, including flags, to it.  Doing this:
> 
> >>> import imaplib
> >>> imap = imaplib.IMAP4("hostname")
> >>> imap.login("name","passwd")
> >>> imap.select("INBOX") # read-only defaults to False
> >>> imap.store(1, 'FLAGS', '(\Deleted)')
> 
> Works fine for me, and should for you.
> 
> =Tony Meyer



More information about the Python-list mailing list