Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parsing e-mail replies #39

Open
TuhinNair opened this issue Feb 13, 2023 · 3 comments
Open

Support parsing e-mail replies #39

TuhinNair opened this issue Feb 13, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@TuhinNair
Copy link

Hey @mdecimus!
First of all, thank you for all your work on the AMAZING email crates you've contributed to the rust ecosystem. I rely on them so frequently!

While sending replies, email clients frequently append older messages at the bottom of the text or html body. They use non-standard formats to delineate the new reply text and the older messages.

Currently when I parse the text or html body using the mail-parser crate it includes the appended context. I'd like to parse just the new content i.e the visible part of the reply.

It's a difficult problem to solve but I've found helpful libraries in other languages. Before complicating my setup I wanted to check if this was possible with mail-parser or within the rust ecosystem. Here's what I found:

  1. https://github.com/willdurand/EmailReplyParser [PHP]
  2. https://github.com/github/email_reply_parser [Ruby]
  3. https://github.com/t2bot/node-email-reply-parser [JS]

Thank you for your help :)

@mdecimus
Copy link
Member

Hi @TuhinNair ,

Currently mail-parser just parses MIME parts and converts HTML parts to plain-text and vice-versa. At the moment I am working on the SMTP server and refactoring the JMAP/IMAP servers but I'll leave this issue open and whenever I have some time I'll implement this feature.

Cheers.

@mdecimus mdecimus added the enhancement New feature or request label Feb 13, 2023
@mdecimus mdecimus changed the title How to parse the "visible" part of an email reply? Support parsing e-mail replies Feb 13, 2023
@i1Fury
Copy link

i1Fury commented Sep 8, 2023

Bumping this issue :)

@prosammer
Copy link

I would also love to see this! Thanks for your work @mdecimus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants