Program Gmail

Try your hand at writing an alternative interface to Gmail using the freely available Python, Perl, PHP, Java, and .NET libraries and API frameworks.

The relatively simple and lightweight data interface to Gmail stems from the separation between user interface (client-side JavaScript) and data model. This has spawned myriad frontends (graphical and otherwise), libraries, and unofficial “API” implementations in Python, Perl, PHP, Java, and .NET.

For a glimpse of the Gmail engine and protocol underlying the official Gmail interface and the lion’s share of the unofficial APIs and libraries written to the service, take a gander at Johnvey Hwang’s “About the Gmail engine and protocol” (http://johnvey.com/features/gmailapi/; scroll down).

Warning

Programmatic access to Gmail is accomplished by screen-scraping either the web interface or its underlying data format. While the data format is pretty simple and isn’t expected to change dramatically, there’s no telling what Google might do that could adversely affect the various programmatic interfaces to their service. Thus, it goes without saying that such hackery comes with no quality of service guarantee. In other words, expect breakages. And if you do notice something’s gone wrong, visit the home page of your chosen programmatic interface for the latest version of the code, news, and further information.

Rather than taking you step by step through the same code in each of the five languages and frameworks, I provide a walk ...

Get Google Hacks, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.