Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: setting email FLAGs in IMAP4 box

Reply
Thread Tools

RE: setting email FLAGs in IMAP4 box

 
 
Tony Meyer
Guest
Posts: n/a
 
      02-10-2004
> 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


 
Reply With Quote
 
 
 
 
Christian Rothe
Guest
Posts: n/a
 
      02-11-2004
Many thanks!! What a fool I am. Now it works

Christian

"Tony Meyer" <t-> wrote in message news:<mailman.1438.1076450070.12720.python->...
> > 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Quetion about flags of socket.recv(bufsize, [flags]) Steve Holden Python 0 02-08-2009 04:09 PM
IMAP4 example in docs causes memory error for me (OS X 10.3, python 2.3) - help? John Owens Python 0 09-14-2004 07:19 PM
Free pop3 or IMAP4 control? John Dalberg ASP .Net 2 09-01-2004 06:13 PM
setting email FLAGs in IMAP4 box Christian Rothe Python 0 02-10-2004 12:31 PM
IMAP4 and deleting a message Wilfredo Sanchez Python 1 12-08-2003 11:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57