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

Read Message

Reads common properties from a MAPI message.

Code

using DRIT.Mail;
using DRIT.Mail.Mapi;

IMailMessage mail = MailFile.Load("message.msg");
MapiMessage mapi = mail.MapiMessage;

Console.WriteLine($"Subject:           {mapi.Subject}");
Console.WriteLine($"Body:              {mapi.Body}");
Console.WriteLine($"HTML body length:  {mapi.BodyHtml?.Length ?? 0}");
Console.WriteLine($"Message class:     {mapi.MessageClass}");
Console.WriteLine($"Sender name:       {mapi.SenderName}");
Console.WriteLine($"Sender address:    {mapi.SenderEmailAddress}");

Remarks

MapiMessage is the central model object for a mail message. It exposes properties backed by MAPI tags (for example PidTagSubject, PidTagBody) as defined in [MS-OXCMSG] and [MS-OXOMSG].

  • Improve this Doc
Back to top

DR-IT Software documentation

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

Generated by DocFX