• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Read MBOX

Reads messages from an MBOX mailbox archive.

Code

using DRIT.Mail.Rfc.Mbox;

using var reader = new MboxReader("archive.mbox");

foreach (var message in reader.Messages)
{
    Console.WriteLine($"From:    {message.From}");
    Console.WriteLine($"Subject: {message.Subject}");
    Console.WriteLine($"Date:    {message.Date}");
    Console.WriteLine();
}

Remarks

MboxReader parses an MBOX file as defined in RFC 4155. Each message in the archive is delimited by a From line. The Messages collection lazily materializes messages as they are enumerated.

  • Improve this Doc
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX