<commit_before># Envelope

Envelope translates raw emails into objects.

## Install with [npm](https://npmjs.org)

```sh
$ npm install envelope
```

## Usage

```javascript
var fs = require( 'fs' )
var Envelope = require( 'envelope' )

// Read email into a buffer
var data = fs.readFileSync( './test.eml' )

// Construct envelope
var email = new Envelope( data )

console.log( email )
```

Example Output:

```
{
  received: [
    'by 10.216.232.26 with SMTP id m26csp10350weq; Mon, 30 Jul 2012 07:44:49 -0700 (PDT)',
    'by 10.216.183.140 with SMTP id q12mr5294522wem.58.1343659483851; Mon, 30 Jul 2012 07:44:43-0700 (PDT)'<commit_msg>Added syntax highlighting on example output in README<commit_after># Envelope

Envelope translates raw emails into objects.

## Install with [npm](https://npmjs.org)

```sh
$ npm install envelope
```

## Usage

```javascript
var fs = require( 'fs' )
var Envelope = require( 'envelope' )

// Read email into a buffer
var data = fs.readFileSync( './test.eml' )

// Construct envelope
var email = new Envelope( data )

console.log( email )
```

Example Output:

```js
{
  received: [
    'by 10.216.232.26 with SMTP id m26csp10350weq; Mon, 30 Jul 2012 07:44:49 -0700 (PDT)',
    'by 10.216.183.140 with SMTP id q12mr5294522wem.58.1343659483851; Mon, 30 Jul 2012 07:44:43-0700 (PDT)'
{'fraction_non_alphanumeric': 0.1413373860182371, 'fraction_numerical': 0.1276595744680851, 'mean_word_length': 3.8419117647058822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2689214', 'n_tokens_mistral': 609, 'n_tokens_neox': 473, 'n_words': 149}