@andyrmitchell/email-reply-parser
v1.6.1
Published
Dependency-free library for parsing plain text email content. Forked from https://github.com/crisp-oss/email-reply-parser/blob/master/test/test.js (itself based on https://github.com/willdurand/EmailReplyParser)
Downloads
3
Readme
Email Reply Parser
Email Reply Parser is a dependency-free library to parse plain-text email replies and extract content
This library supports most email replies, signatures and locales.
Fork rationale: be dependency free
It's a fork of https://github.com/crisp-oss/email-reply-parser/, but with the node dependency on re2 removed, so it's useable in browsers.
😘 Maintainer: @baptistejamin
Who uses it?
👋 You use this library and you want to be listed there? Contact us.
Installation
Install the project using NPM:
npm install --save email-reply-parser
Features
This library is used at Crisp everyday with around 1 million inbound emails. Over the years, we improved this library so it can work with most emails.
- Strip email replies like
On DATE, NAME <EMAIL> wrote:
- Supports around 10 locales, including English, French, Spanish, Portuguese, Italian, Japanese, Chinese.
- Removes signatures like
Sent from my iPhone
- Removes signatures like
Best wishes
Usage
var EmailReplyParser = require("email-reply-parser");
var email = new EmailReplyParser().read(MY_EMAIL_STRING);
console.log(email.getVisibleText());
Contributing
Feel free to fork this project and submit fixes. We may adapt your code to fit the codebase.
You can run unit tests using:
npm test
Credits
- GitHub
- William Durand [email protected]
- Crisp IM
License
email-reply-parser is released under the MIT License. See the bundled LICENSE file for details.