inboxthunks
v0.0.1
Published
co-based inbox, inbox thunkified
Downloads
2
Maintainers
Readme
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 : '[email protected]',
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