I've been going through the Api documentation and although I can create and delete labels, and search for messages with a certain label, I can't find a way to set a message to a particular label.
I notice though, that the GmailAccount method storeFile can set a label - is there a way to do this for a generic message?
Many thanks,
stoical
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been going through the Api documentation and although I can create and delete labels, and search for messages with a certain label, I can't find a way to set a message to a particular label.
I notice though, that the GmailAccount method storeFile can set a label - is there a way to do this for a generic message?
Many thanks,
stoical
you can apply a label like this:
folder = ga.getMessagesByFolder('inbox')
for thread in folder:
if thread.id == '110ceb62c421f5e2':
thread.addLabel("My Own Label")
i haven't found a way yet to set a label on a message by id only,
but you also could write an own method, that will do this automatically.