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