angular-email-parser

RFC 822 email parser module for Angular JS.
1 person uses it
Author: 310612?v=3 dbtek

angular-email-parser Build Status

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

comments powered by Disqus
This page was last updated over 2 years ago.