0
votes

I have a somewhat interesting phenomenon occurring in Outlook 2019: when we are using Exchange accounts and toggle off the "Use Cached Exchange Mode to download email to an Outlook data file" option, we are no longer able to get the e-mail addresses for recipients via the Microsoft.Office.Interop.Outlook.PropertyAccessor interface (using the MAPI property PR_SMTP_ADDRESS) from an e-mail, in which we entered the recipient e-mails using the suggested Outlook contact. (eg. when the address is entered it looks like this: 'John Smith'). When we observed the item using OutlookSpy, we noticed that the specific property's value says MAPI_E_NOT_FOUND or is not present at all. I also noticed that in these cases, Outlook puts the corresponding e-mail addresses in the BCC field, which we obviously can't access when viewing the e-mail in the recipient's inbox. Is there a way for us to get the addresses, or is there some kind of workaround for this problem?

1

1 Answers

0
votes

No property is guaranteed to be present. If the property is missing, try to use Recipient.AddressEntry.GetExchangeUser().PrimarySmtpAddress (error and exceptions checks omitted).