RFC 822 email parser module for Angular JS. Based on header-parse.js.
###Install Install via bower:
$ bower install angular-email-parser
Include js file and add dependency in your app.
angular.module('myApp', ['emailParser']);
Use provider: $parseEmail
.
###Usage
$parseEmail(mail, strict, parse);
Parameters
- mail (String) - Email source in plain text
- strict (Boolean) Optional - `true` for strict RFC822 compliance (don't treat \n without \r as line breaks)
- parse (Boolean) Optional - `false` to disable actually parsing headers (just separate the header block and the body)
Returns
{
body: 'mail body content',
headers: {
From: '',
To: [],
...
}
}
###Author İsmail Demirbilek (@dbtek)
###License MIT
###Credits David Bronke - header-parse.js