Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Python, Imap & Gmail

Python, Imap & Gmail

Shrayas Rajagopal

April 25, 2015
Tweet

More Decks by Shrayas Rajagopal

Other Decks in Technology

Transcript

  1. ?

  2. # ... client.select("INBOX") emails = client.search(None, '(FROM "[email protected]")') for email

    in emails[1][0].split(): client.store(email, '+X-GM-LABELS', "foo") # ... add_foo_label.py
  3. •  IMAP, POP3 •  imaplib   •  Gmail IMAP extensions

             X-­‐GM-­‐RAW,  X-­‐GM-­‐LABELS