0.1.3 • Published 9 years ago

node-reply-worker v0.1.3

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

node-reply-worker

An email reply worker that listens to new emails and emits an event every time an email with an id arrives.

This works with plus addressing, for example, if you have the email address jonh@example.com, you can add +<something> before the @ sign, like jonh+123@example.com. Most mail servers support this feature, but if you are not sure, you can check by sending and email as described.

Install

npm install node-reply-worker --save

Usage

var ReplyWorker = require('node-reply-worker');
var inspect     = require('util').inspect;

var worker = new ReplyWorker({
  mailAddress: /* Your email address */,
  mailPassword: /* Your email password */,
  stripMessages: /* Removes replied messages and signatures */,
  checkInterval: /* Interval in minutes to check for new messages, default: 10 */,
  imapConnection: {
    host: /* Server address */,
    port: /* Server port, default: 993 */,
    tls: /* Use tls, default: true */
  }
});

worker.on('reply', function(res) {
  /**
   * res format:
   * - id: <the part between + and @ of the email address>,
   * - from: <from email address>,
   * - text: <the mail text>
   */
  console.log(inspect(res));
});

worker.start();
0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago