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

Save Message

Saves a loaded mail message to a file in the specified format.

Code

using DRIT.Mail;

// Load a message from MSG
IMailMessage mail = MailFile.Load("message.msg");

// Save it as EML
mail.Save("message.eml", MailMessageFormat.Eml);

// Save it to a stream as MBOX
using (var stream = File.Create("message.mbox"))
{
    mail.Save(stream, MailMessageFormat.Mbox);
}

Remarks

The Save method converts the underlying MAPI message to the requested format using the converters in the DRIT.Mail.Conversion namespace.

  • Improve this Doc
Back to top

DR-IT Software documentation

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

Generated by DocFX