Turn raw email into useful domain objects in Node.js


Turn .eml files into usable domain objects.

NPM version


bash $ npm install letter-opener

Quick Start

var letterOpener = require('letter-opener')

var core = new letterOpener('tmp')

// id is the filename of one of the messages
core.findMessage(id, function gotMessage(err, message) {
  // check for errors and do something with your message 

core.findAllMessages(function allMessages(err, messageFiles) {
  // check for errors and do something with your messages

Running Tests

To run the test suite, first invoke the following command within the repo, installing the development dependencies:

bash $ npm install

Then run the tests:

bash $ npm test


Author: Ethan Garofolo