setting email FLAGs in IMAP4 box

C

Christian Rothe

Hello Everybody, I need your help,

I'm trying to write a simple forwarding script with python2.2. I want
to forward unseen emails to another box after two days. This script
runs every morning by a cron ob. Everything works fine, but I cannot
set a flag for the forwarded emails. Best would be to create an own
flag to identify mails, that are forwarded a day before. I don't know
how to create an own flag. If I try to use an existing flag like
'UNSEEN', 'Deleted'.. or so, I use the commands:

imap = imaplib.IMAP4("hostname")
imap.login("name","passwd")
imap.select("INBOX",1)
imap.store(1, 'FLAGS', '(\Deleted)')

, but it doesn't work. I always get the message

('NO', ['Permission denied'])

Other commands are working fine, e.g.
('OK', ['1 (INTERNALDATE "29-Jan-2004 11:43:41 +0100")'])

How can I get 'Permissions' to change flags?? Does anybody know??

best regards
Christian Rothe
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top