Setting labels for a message

W Ross
2006-05-21
2013-05-21
  • W Ross

    W Ross - 2006-05-21

    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

     
    • Beeswax

      Beeswax - 2007-02-18

      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.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks