co-inbox

    1.1.0 • Public • Published

    co-inbox

    Build Status

    Better inbox api based on visionmedia/co and andris9/inbox

    NPM NPM

    Installation

    $ npm install co-inbox

    Usage

    const inbox = Object.create(Inboxes);
    const client = yield inbox.createConnection(false, 'imap.gmail.com', {
      secureConnection: true,
      auth: {
        user: 'yorkiefixer@gmail.com',
        pass: 'xxxxxxxxx'
      },
      debug: true
    });
     
    const mailboxes = yield inbox.listMailboxes();
    console.log(mailboxes);
     
    // use unsupported function from upstream
    inbox.client.createMessageStream(32)
      .pipe(process.stdout, {end: false});
     
    // close
    inbox.close();

    NB: for more infomation on API, you could visit andris9/inbox

    Supported API

    • createConnection(port, host, option)

    • listMailboxes()

    • getMailbox(path)

    • openMailbox(path)

    • listMessages(from, limit)

    • listMessagesByUID(first, last)

    • listFlags(from, limit)

    • search(query, isUID)

    • fetchData(uid)

    • fetchFlags(uid)

    • addFlags(uid, flags)

    • removeFlags(uid, flags)

    • storeMessage(message, flags)

    • copyMessage(uid, destination)

    • moveMessage(uid, destination)

    • deleteMessage(uid)

    License

    MIT

    Keywords

    Install

    npm i co-inbox

    DownloadsWeekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • yorkie