Ravi Kanth
Ravi Kanth

Reputation: 1210

how to get the To, BCC, CC Email address instead of Display names?

I am able to get the To, BCC, CC, Subject, Body on Item send event but my problem is I am getting the display names instead of Email addresses

   MailItem outlookMailItem = (Microsoft.Office.Interop.Outlook.MailItem)Item;
   outlookPropertites.ToAddress = outlookMailItem.To;

this is returning me the display name but I want the email addresses. Is there any other property to get the email addresses?

Upvotes: 0

Views: 1102

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66215

Loop through the MailItem.Recipients collection, for each Recipient check the Type (olTo/olCC/OlBCC), Name, and Address properties.

Upvotes: 1

Related Questions