RE: setting email FLAGs in IMAP4 box

Discussion in 'Python' started by Tony Meyer, Feb 10, 2004.

  1. Tony Meyer

    Tony Meyer Guest

    > 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
    Tony Meyer, Feb 10, 2004
    #1
    1. Advertising

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

    Christian

    "Tony Meyer" <> wrote in message news:<>...
    > > 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
    Christian Rothe, Feb 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Dalberg

    Free pop3 or IMAP4 control?

    John Dalberg, Sep 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,329
  2. Wilfredo Sanchez

    IMAP4 and deleting a message

    Wilfredo Sanchez, Dec 8, 2003, in forum: Python
    Replies:
    1
    Views:
    269
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Dec 8, 2003
  3. Christian Rothe

    setting email FLAGs in IMAP4 box

    Christian Rothe, Feb 10, 2004, in forum: Python
    Replies:
    0
    Views:
    263
    Christian Rothe
    Feb 10, 2004
  4. John Owens
    Replies:
    0
    Views:
    347
    John Owens
    Sep 14, 2004
  5. Steve Holden
    Replies:
    0
    Views:
    772
    Steve Holden
    Feb 8, 2009
Loading...

Share This Page