Email reply parser.
Package EmailReplyParser | Platforms .NET 4.6, .NET Standard 2.0
Quick .NET (C#) port of https://github.com/crisp-im/email-reply-parser with small amendments.
var email = EmailParser.Parse(emailContent);
// Amending the default header quote regex patterns with pattern for Outlook displaynames...
var otherEmail = EmailParser.Parse(otherEmail, RegexPatterns.QuoteHeadersRegex.Concat(new [] {new Regex( @"^\s*(From\s?:.+\s?(\[|\().+(\]|\)))", RegexOptions.Compiled)} ).ToArray());
foreach (var fragment in otherEmail.Fragments)
{
Console.WriteLine(fragment.Content);
}
- GitHub
- William Durand william.durand1@gmail.com
- Crisp IM