Earlier we(programmers) use CDO or MAPI to retrieve the real SMTP address (like firstname.lastname@example.org) of Exchange account. But with the new object model, retrieving the SMTP address of Exchange account is much easier; it’s as simple like the following steps:
- Get the ExchangeUser object by using the GetExchangeUser method
- From the ExchangeUser, retrieve the PrimarySmtpAddress property.
FYI, i have enclosed some of the relevant properties and objects, which can helps us to do more…
Returns the type of address entry. You can use this property to distinguish between Exchange address and non-Exchange address. For Exchange addresses, use GetExchangeUser and GetExchangeDistributionList methods for getting more address details.
Returns a PropertyAccessor object that allows you to access other properties.
- GetExchangeDistributionList Method:
Returns ExchangeDistributionList object that provides more information about Exchange Distribution List.
- GetExchangeUser Method:
Returns ExchangeUser object that provides more information about Exchange address entry.
- GetContact Method:
Returns a Contact object for this address entry
Hope this helps!!