Skip to content

Instantly share code, notes, and snippets.

@baudehlo
Created April 5, 2011 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baudehlo/904366 to your computer and use it in GitHub Desktop.
Save baudehlo/904366 to your computer and use it in GitHub Desktop.
var body = require('./mailbody');
var fs = require('fs');
var util = require('util');
var b = new body.Body();
b.state = 'headers';
var data = fs.readFileSync('/tmp/multipart.eml', "UTF-8").split(/\n/);
for (var i=0; i < data.length; i++) {
b.parse_more(data[i] + '\n');
}
console.log(util.inspect(b, true, null));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment