EmailReplyTrimmer is a small library to trim replies from plain text email.
To trim replies:
trimmed_body = EmailReplyTrimmer.trim(email_body)
Get it from GitHub.
Run rake
to run the tests.
Library to trim replies from plain text email.
License: MIT License
EmailReplyTrimmer is a small library to trim replies from plain text email.
To trim replies:
trimmed_body = EmailReplyTrimmer.trim(email_body)
Get it from GitHub.
Run rake
to run the tests.
Some people get creative† and have UTF8 charactes as DELIMITER_CHARACTERS
such as em- or en-dashes. Maybe add those?
† sometimes unintentionally since typing --
can result in a em-dash.
I changed the sender mail address in discourse recently. Now, the mail is very long and clients that break lines at 80 characters will generate a reply like this:
[message body]
/ Greetings
2017-02-05 13:29 GMT+02:00 Very long author name <
[email protected]>:
> [Original Messages is quoted here]
> [...]
The email_reply_trimmer does not strip away the lines between Greetings and the quoted original message.
I've caught another "in reply to"-line in my German Discourse install:
Am 21.04.2016 17:48 schrieb "Max Mustermann"
Here's a (redacted) fragment of the raw email:
Bin gleichzeitig robust, sofern n=C3=B6tig.
Am 21.04.2016 17:48 schrieb "Max Mustermann" <[email protected]=
m
>:
> max.mustermann <https://discourse.pseuco.com/users/max.mustermann> Ma=
x
> Mustermann <https://discourse.pseuco.com/users/max.mustermann>
> 21. April
>
> Vielleicht noch eine wichtige Frage:
would be really awesome for packagers
Some email have the form:
-----Mensaje original----- Enviado: 16/02/2016 14:53
This emails don't are correcting parser
Some signatures aren't delimited by symbols but by specific words or phrases standing alone on a line, such as "Regards", "Cheers", "All the best", "Cordialement", "Bien à vous"...
See this issue for some relevant details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.