Get SMTP email address of current user in Outlook add-in from X500 or distinguished name address

Hello,

I am working on a C# .NET VSTO add-in for Microsoft Outlook which needs to get the SMTP email address of the current user in Outlook. Our code works fine for most clients but for one client that is using Office 365 e-mail accounts, Office 365 Outlook click-to-run and Azure AD Connect sync, our code fails to obtain the SMTP address of the current user.

The Application.Session.CurrentUser.AddressEntry.GetExchangeUser() method returns null.
The Application.Session.CurrentUser.AddressEntry.Type property returns EX.
The Application.Session.CurrentUser.Address property returns an X500 or distinguished name address that looks something like this:

/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=6cf18a998187475eb1b5d7a7609f12db-gkriggs

So we have run out of ideas what other VSTO Outlook object model properties or methods to look at to obtain the current user’s SMTP email address.

Does the Aspose.Email for .NET library provide any features that would allow us to get the SMTP email address of the current user inside of a VSTO add-in for Microsoft Outlook?

Or does the Aspose.Email for .NET library provide any features that would allow us to translate the X500 or distinguished name address into an SMTP email address?

Thanks,
Greg

@gkriggs,

Aspose.Email API doesn’t porvide any such features that would allow to get the SMTP email address of the current user inside of a VSTO add-in for MS Outlook as the API is independent of Outlook. Also, there is no such feature that would allow to translate the X500 or name address into an SMTP email address. With respect to its capabilities related to Exchange Server, you can have a look at our documentation section, working with Exchange EWS Client, and let us know if you have any query in this regard.