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.

inboxlogo

 

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/Outlook.com, 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. 

 

inboxIMAP

 

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. 

 

inboxicon

More Information

Inbox

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.

 

Banner


PHP 8.4 Adds Property Hooks
26/11/2024

PHP 8.4 is available with improvements including property hooks, asymmetric visibility, and an updated DOM API.



Ursina - A Game Engine Powered by Python
08/11/2024

Ursina is a new open source game engine in which you can code any type of game in Python, be it 2-D, 3-D, an application, a visualization, you name it.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Wednesday, 09 July 2014 )