I have a Django email client powered by IMAPClient library. I successfully control read/unread status, as well as deleted. As descriped here.
My code for declaring a message as readlooks like this:
from imapclient.imapclient import SEEN
server.add_flags(msg_uids, SEEN)
Now I am stuck trying to add flag 'Junk'
to the message.
I mean, doing something like:
server.add_flags(msg_uids, '\Junk')