0.0.1 • Published 10 years ago

inboxthunks v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

inboxthunks

Thunkified imap client

Based on inbox

install

npm install inboxthunks

example

var inbox = require ('inboxthunks');
var co = require ('co');

var client = inbox.init(false, 'imap.gmail.com', {
  secureConnection: true,
  auth : {
    user : 'mail@gmail.com',
    pass : 'pass'
  }
});

co (function * (){
  // try
  yield client.connect();
  // catch the error

  // list mailboxes or other api call
  var mailboxes = yield client.listMailboxes();
  console.log (mailboxes);
  
  // try
  yield client.close();
  // catch the error
}

license

MIT