TnefMessageRecipients Property

Get the recipients of the message.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public IReadOnlyList<TnefRecipient> Recipients { get; }

Property Value

IReadOnlyListTnefRecipient
The recipients.

Remarks

Gets the recipients of the message, in the order in which they appeared in the TNEF stream.

Example

C#
                    public static void PrintRecipients (TnefMessage tnef)
{
    foreach (var recipient in tnef.Recipients) {
        Console.WriteLine ("{0}: {1} <{2}> ({3})", recipient.RecipientType, recipient.DisplayName,
            recipient.EmailAddress, recipient.AddressType);

        // Every property of the recipient is also available.
        var smtpAddress = recipient.Properties.GetString (TnefPropertyTag.SmtpAddressW);

        if (smtpAddress != null)
            Console.WriteLine ("    SMTP address: {0}", smtpAddress);
    }
}
                  

See Also