Git Product home page Git Product logo

imap2rest's Introduction

imap2rest

IMAP 2 REST interface.

Disclaimer

This is just a proof of concept. It's neither maintained nor supported. Use at your own risk!

What's implemented

curl http://localhost:8080/ && echo
["Chats","Contacts","Drafts","Emailed Contacts","INBOX","Junk","Sent","Trash"]

curl "http://localhost:8080/INBOX/search?since=November%201,%202011"
["790","791","792", ...skipped..., "852"]

curl "http://localhost:8080/INBOX/31337/headers"
{"content-type":["text/html; charset=UTF-8"],...}

curl "http://localhost:8080/INBOX/31337/body"
<A bunch of HTML>

Installation

git clone --recursive http://github.com/laggyluke/imap2rest.git
cd imap2rest
sudo npm link

Running

imap2rest is configured using following environment variables:

HTTP_HOST -- host to bind web server to (default: '0.0.0.0')
HTTP_PORT -- host and port to bind web server to (default: '8080')

IMAP_USERNAME -- IMAP username e.g. '[email protected]'
IMAP_PASSWORD -- password for IMAP_USERNAME
IMAP_HOST -- IMAP server host (default: 'localhost')
IMAP_PORT -- IMAP server port (default: '143' or '993', depending on IMAP_SECURE)
IMAP_SECURE -- should we use SSL or not, (default: true)

You can specify these setting inline:

$ IMAP_USERNAME=foo IMAP_PASSWORD=bar imap2rest
Server started.

or, more conveniently, inside a shell script:

$ cat start.sh
#!/bin/bash
export IMAP_USERNAME=foo
export IMAP_PASSWORD=bar
imap2rest
$ ./start.sh
Server started.

imap2rest's People

Contributors

gmiroshnykov avatar

Watchers

James Cloos avatar steelburn avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.