Free Support Forum - aspose.com

Extract the Email-address of the "Sent To"

How can i extract the Email-address of the "Sent To"

By using
Field.Aspose.Network.Outlook.MapiMessage

In the "DisplayTo" Field I find the Name (displayed), This is the Name the person I sent the mail, but without email-address.

How can I extract the e-Mailaddress of this Person (Martijn Brants in the sample, the corresponding mailto-address is : martijn@pruller.nl) ?
Attached you find an example MSG file.

Hi,

Thank you for inquiry.

For getting the name and email addresses of all the recipients, please use the MapiMessage.Recipients collection.

MapiMessage message = MapiMessage.FromFile(“bla9.msg”);
foreach (MapiRecipient recipient in message.Recipients)
{
Console.WriteLine("Recipient Name: " + recipient.DisplayName);
Console.WriteLine("Recipient Email: " + recipient.EmailAddress);
}