I’m maintaining a project where we receive highly heterogenous data in a gmail inbox. Previously I was using a Ruby API for gmail, but it was highly unreliable and it didn’t really fit in very well with all the other components of the system. For various reasons I won’t go into here, this has to be the way it’s done for at least some of our data (it’s not my preference by any means!)
So is there a good way to use Gmail in a nuanced way? Are there any languages with a good solid API that uses Gmail’s native concepts? We need to execute some pretty complex behaviours while the email is still in the inbox based on combinations of tags that are set up by gmail filters.
If all else fails I’m looking at building a wrapper for the IMAP library in Python; all the existing Python APIs that I could find have been broken by changes to the API-ish thing that gmail provides.
There is a library called libgmail, but if you only need email related functionality stick to IMAP access.
There are many tutorials how to access gmail using IMAP over the internet. Good starting points is:
http://verpa.wordpress.com/2010/01/23/python-gmail-imap-part-1/.