For the record, if you just need to do some simple scripting of your Gmail, maybe on cron, Google Apps Script is great for that. https://developers.google.com/apps-script/
Thanks! I was working on a side project that needed to access my GMail, and I couldn't believe that a good library didn't exist already. If you find any bugs or use cases that aren't covered well, file an issue or make a contribution!
Guess I can potentially use this as a module in a tornado/Django web application for scheduling email, without having the user to sign in to gmail explicitly or opening up a separate pop-up/browser window.
This is really cool. The only thing I use gmail web interface for since I moved to mutt and IMAP, is forwarding already sent emails with large attachments to new addresses. They way I have mutt set up is that it downloads the attachment first and then sends it once per recipient. The web interface just sends it, so I wonder is there a way to duplicate that functionality with mutt or with a library like this.
28 comments
[ 2.2 ms ] story [ 55.7 ms ] threadHere's a script to generate them: https://google-mail-oauth2-tools.googlecode.com/svn/trunk/py...
If you're looking for non-gmail-specific email lib thingerator, check out IMAPClient (it's better than imaplib I swear!):
http://imapclient.readthedocs.org/en/latest/
For the record, if you just need to do some simple scripting of your Gmail, maybe on cron, Google Apps Script is great for that. https://developers.google.com/apps-script/
Here's a recent simple example I wrote up. http://mikecr.it/ramblings/marking-gmail-read-with-apps-scri...
Just when I needed it and wanted to write one you posted it. I don't think I would have done half the good job you did.
I've been planning to create a Python script to help me automatically label my older emails based on content. This is a big help.