Talon.net is a .NET implementation of Mailgun's awesome talon email processing library (https://github.com/mailgun/talon)
Please note that Talon.NET is incomplete, and is still a work in progress! It currently supports plaintext reply extraction and bruteforce signature extraction.
It does not yet support HTML reply extraction, machine learning signature extraction, or any other talon features.
Use NuGet!
PM> install-package Talon.NET
Extracting a reply from a text message:
using Talon;
class Program
{
static void Main(string[] args)
{
var text = @"Reply
-----Original Message-----
Quote";
var reply = Quotations.ExtractFrom(text, "text/plain");
reply = Quotations.ExtractFromPlain(text);
// reply == "Reply"
}
}
Extracting a signature using the brute force method:
using Talon;
class Program
{
static void Main(string[] args)
{
var text = @"Wow. Awesome!
--
Bob Smith";
var result = Bruteforce.ExtractSignature(text);
// result.Item1 = "Wow. Awesome!"
// result.Item2 = "--\r\nBob Smith"
}
}