Inbox - An API To Modernize Email
Inbox - An API To Modernize Email
Wednesday, 09 July 2014

You might think that there enough mail APIs already, but Inbox has another one for you and its approach to creating a universal email system is clever.



Surely SMTP, POP3 and IMAP are enough mail APIs for anyone?

As we recently reported not for Google, which introduced a Restful API for GMail. Of course the problem with the GMail API is that it only works with GMail and hence using it in your app locks you into to whatever Google does in the future.

Inbox, however, has an API that works with a range of email systems and perhaps all email systems in the near future. Its Microsoft Exchange support is currently in beta. 

So the advantage of using Inbox's API is near universality and its open source so in theory its future proof. As Inbox explains:


  • Inbox is open-source, like Ruby on Rails, so you can run it yourself.

  • Inbox supports many providers, including Gmail, Yahoo, and Hotmail/, with plans to quickly add more. The Inbox Developer Program also supports Microsoft Exchange for enterprise users. You can build once for users everywhere.

  • If you find a bug in Inbox, you can submit a pull request and help fix it. If you have an idea for a feature, you can fork Inbox to add it.

  • Inbox is an email company. Google is an advertising company. This product is our focus, and will not be "discontinued" unexpectedly.

Take careful note of the final point.


The system is free to use, but there is a catch that you need to be aware of.

To implement its Restful API, Inbox has created a mail proxy server - the Inbox Sync Engine. What you do is setup the Sync Engine on a suitable server and it collects your email from all of the other services. So, for example, it collects your GMail email using a standard API like IMAP.  Your email, from possibly multiple sources, is aggregated by the Sync Engine. Your app then connects to the Sync Engine using the Restful API to collect, create and generally work with your email. 




So, if you build an app that makes use of the Inbox API, you have to persuade your users to register with an instance of the Sync Engine and set up their email accounts so that it can work with their email.

The Sync Engine acts as a buffer that converts the different "legacy" standard APIs to a single Restful JSON based API. 

At the moment you have to host the Sync Engine - either on a local, hosted or cloud server. In the near future Inbox will offer the Sync Engine as a service at a cost and this is how they are going to make some money to keep the whole thing running. 

The Inbox API is fairly easy to use and it does all of the things you might expect - in particular it organizes messages into threads and uses tags for classification. You can send and receive emails using the API and as it is based on Rest it isn't language specific as long as you are happy working with HTTP requests. There are libraries for JavaScript and iOS and no doubt more will follow. 

So is this a good idea?

The basic premise is that email APIs, and IMAP in particular, are difficult. This might be true, but there are IMAP libraries for most languages and even for JavaScript now that it supports raw sockets. Most email servers support IMAP or POP3, so while the APIs might not be sophisticated they are universal and work without the need for a proxy server. This said, when you create an app that does clever things with email you generally have to get the user to supply their email credentials and you could code the setup of the Sync Engine without causing them too much trouble. In this case the only problem would be hosting the Sync Engine, which would add an additional cost factor to supporting the app. 



More Information


Related Articles

Gmail Gets A Restful API

Email to SMS       

How to send plain text or HTML e-mail using Perl       

Checking for live email addresses in PHP       

A POP 3 Class       


To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.



Serialization Will Go From Java - Sometime

Mark Reinhold has told attendees of the DevoxxUK conference that Oracle does have a long term goal to remove serialization from the language, but just when is less clear.

AI Creates Breakthrough Realistic Animation

Given how deep learning is cropping everywhere it was only a matter of time before it would be applied to facial reenactment. This will have a big impact in animation and computer graphics.

More News






or email your comment to:


Last Updated ( Wednesday, 09 July 2014 )

RSS feed of news items only
I Programmer News
Copyright © 2018 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.