node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

co-mailparser

co-mailparser

co-based mailparser

install

npm install co-mailparser

example

var parse = require ('co-mailparser');
 
co(function * (){
  try {
    // email can be instance of `ReadableStream` or `string` 
    var obj = yield parse (email, { /* mailparser options */});  
    console.log (obj);
  } catch (err) {
    console.log(err)
  }
})();

I added options.headersOnly to get email headers only

var obj = yield parse (email, { headersOnly : true });  

Based on mailparser

license

MIT