SMTP Address of the Sender of a Mail Item

318 views Asked by At

I have created a plugin for Outlook 2016.

To get the sender's SMTP address, I am following How to: Get the SMTP Address of the Sender of a Mail Item

Which recently start breaking when it try to do below line

if (sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry
    || sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)

Message = "The operation failed." StackTrace = "at Microsoft.Office.Interop.Outlook.AddressEntry.get_AddressEntryUserType()\r\n at ....." ErrorCode = -1802485755

0

There are 0 answers