I have an inbox set up in exchange, [email protected]
Additionally, there is an alias for this, [email protected]
, so all emails to the news
address end up in the hello
inbox.
Ideally, I want to be able to tell which alias an email has been sent to, using EWS.
When I send an email to [email protected]
, and examine the Internet headers of the message using Microsoft Outlook, the To:
header reads To: Hello <[email protected]>
which is exactly what I want to see.
However, using EWS, when I look at the ToRecipients property of the message, the reported email address is always that of the primary SMTP address. Also the InternetMessageHeaders property of the Webservices.Data.Item does not contain the To:
property. I also can't seem to see the correct address using EWSEditor to examine all the properties of the message.
The answer to this forum post seems to suggest that,
...The Information about the actual email address a message is sent to is stored in the recipients collection which you can't access (outside of exportmessage) in EWS...
How would I go about doing this programatically so I can find the correct To:
address?