EmailReplyParser icon indicating copy to clipboard operation
EmailReplyParser copied to clipboard

mail from iOS doesn't parse out the original message

Open gregveres opened this issue 7 years ago • 1 comments

Hi @EricJWHuang

First off, thank you for providing this library.

I too have the same need to parse out the last response. I has started collecting emails from various email clients and had already started building a test suite when I found this library. So I NuGet'd your package and hooked it up. I found that a simple response to an html email on iOS didn't parse out the response at all.

Here is the text of the response from iOS:

string text = "Hi Adrian\r\n\r\nI can play on sunday.\r\n\r\nOn Jan 20, 2018, at 10:03 AM, SkyCourt <[email protected]<mailto:[email protected]>> wrote:\r\n\r\n\r\nA new message has been sent to you on SkyCourt from Adrian\r\n\r\nSaturday, Jan 20\r\nAdrian\r\n10:02 AM Squash tomorrow Sunday at 10:40 ? Let me know, Adrian. Thanks.\r\n\r\n\r\n\r\nPlease click this link to visit the site to reply or view new messages.<https://skycourt.ca/Player?showMessages=10968>\r\n\r\nGood luck on the court.\r\n";

When I run this through the parser I get

"Hi Adrian\n\nI can play on sunday.\n\nOn Jan 20, 2018, at 10:03 AM, SkyCourt <[email protected]<mailto:[email protected]>> wrote:\n\n\nA new message has been sent to you on SkyCourt from Adrian\n\nSaturday, Jan 20\nAdrian\n10:02 AM Squash tomorrow Sunday at 10:40 ? Let me know, Adrian. Thanks.\n\n\n\nPlease click this link to visit the site to reply or view new messages.<https://skycourt.ca/Player?showMessages=10968>\n\nGood luck on the court."

It didn't strip any of it away.

gregveres avatar Jan 22 '18 05:01 gregveres

The isQuoteHeader regex isn't matching that On Jan 20, ... wrote: line. I can't see why straight away. I think the regex is correct for matching this line.

gregveres avatar Jan 22 '18 06:01 gregveres