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

Validate MSG

Validates the structure of an MSG file.

Code

using DRIT.Mail.Msg;
using DRIT.Mail.Validation;

var validator = new MailValidator();
ValidationResults results = validator.Validate("message.msg");

if (results.IsValid)
{
    Console.WriteLine("The MSG file is valid.");
}
else
{
    Console.WriteLine($"Found {results.Items.Count} issue(s):");
    foreach (string issue in results.Items)
    {
        Console.WriteLine($"  - {issue}");
    }
}

Remarks

MailValidator checks the MSG compound file structure, property streams, and storage hierarchy for consistency as defined in [MS-OXMSG].

  • Improve this Doc
Back to top

DR-IT Software documentation

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

Generated by DocFX