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 <Notifications@example.com<mailto:Notifications@example.com>> 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 <Notifications@example.com<mailto:Notifications@example.com>> 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."
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.
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 <Notifications@example.com<mailto:Notifications@example.com>> 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 <Notifications@example.com<mailto:Notifications@example.com>> 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.