/EPEmailReplyParser

Email reply parser. Ported from https://github.com/crisp-im/email-reply-parser

Primary LanguageC#MIT LicenseMIT

EmailReplyParser

Email reply parser.

Quick .NET (C#) port of https://github.com/crisp-im/email-reply-parser forked from https://github.com/jokokko/EmailReplyParser with update from different ports of the same library.

Usage

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);
}

Credits