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

Read Recipients

Enumerates the recipients of a MAPI message.

Code

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

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

foreach (IMapiRecipient recipient in mapi.Recipients)
{
    Console.WriteLine($"Name:        {recipient.Name}");
    Console.WriteLine($"Address:     {recipient.EmailAddress}");
    Console.WriteLine($"AddressType: {recipient.AddressType}");
    Console.WriteLine($"Type:        {recipient.Type}");
    Console.WriteLine();
}

Remarks

Each recipient is represented by MapiRecipient, which implements IMapiRecipient. The Type property indicates whether the recipient is a primary (To), carbon-copy (Cc), or blind carbon-copy (Bcc) recipient.

  • Improve this Doc
Back to top

DR-IT Software documentation

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

Generated by DocFX