A simple email parser
npm install emailparserA simple MIME email parser for nodejs applications.
Takes raw emails and parses out text and attachments.
``
const emailParser = require('emailparser');
let email = [ raw email text ] ;
let parsedEmail = emailParser.parseEmail(email);
console.log(parsedEmail);
/*
{
"attachments": [],
"content": [
{ ... }
],
"headers": {
"date": 0,
"from": { "parsed": "test1@example.com", "raw": "Test1
"to": [{ "parsed": "test2@example.com", "raw": "test2@example.com" }],
"subject": "email test"
}
}
*/
`
field changed to include all raw email headers, no parsing
- previous headers now appear in meta` field - has specific parsed headers: to, from, etc