/browsermail

Javascript IMAP email client for browsers

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

A Javascript IMAP Email client for browsers (Chrome only, for now).

At the moment this is just a proof-of-concept project to show that an IMAP email client is possible within the browser, in pure JS.

This only fetches the latest messages for your inbox and shows them. Email body text is not yet parsed. Another limitation is that only SSL/TLS connections are supported.

Running it

  1. Download and unzip release/browsermail.zip.
  2. Load the output folder into chrome://extensions as an unpacked extension.

This was built and tested successfully with Chromium 29 against a gmail.com account

Building from source

It uses Compass and Foundation for the styling so you'll need Ruby installed.

$ bundle install
$ npm install
$ bower install

Load the build folder into Chrome as an unpackaged extension. Notice that JS minification is turned off in weber.json as otherwise the Chrome developer tools console seems to crash.

Technical info

This is only possible in browsers which allow raw TCP socket access. For Chrome this means creating a packaged app with the socket permissions.

I grabbed an existing IMAP client (see below) for node and simulated Node's Socket, TLS and Buffer classes.

The following projects are used to make this possible:

Future stuff

Technically speaking the following should all be possible:

  • Replies
  • Attachments
  • PGP encryption
  • Firefox extension
  • Folder listing
  • Multiple accounts
  • Offline cacheing and usage (localStorage, etc.)

Possible codebase improvements:

  • Replace EventEmitter with better one which has .once()
  • Replace Weber with a Grunt plugin which does the same (and possibly automates the Buffer lib usage too)
  • Grunt task to create Chrome extension
  • Automated tests

License

Licensed under AGPL, see LICENSE.md.