// Create connection info
var info = EmailConnectionInfo.CreateImapConnectionInfo(@"imap-mail.outlook.com", 995, "username", "password");
// Create an email container
using (var container = new EmailContainer(info))
{
// Iterate over emails
foreach (var entity in container.Entities)
{
// Create a stream with content of email
var stream = container.OpenEntityStream(entity); // or var stream = entity.OpenStream();
// Create a text extractor for email
using (var extractor = new EmailTextExtractor(stream))
{
// Extract all the text from email
Console.WriteLine(extractor.ExtractAll());
}
}
}