none
MAPI PropertyAccessor.GetProperty() slow in Online Mode [Tricky question!] RRS feed

  • Question

  • Hi,

    I have a very difficult problem to solve. My add-in iterates through the recipients in ItemSend and resolves the email addresses. For GAL recipients of type OlAddressEntryUserType.olExchangeUserAddressEntry, calling pa.GetProperty(PR_SMTP_ADDRESS).ToString(); is painfully slow in Online Mode of Outlook. This problem only happens in Online Mode and not in Cached Mode of Outlook, but there is of course one very important client who needs to run Outlook in Online Mode. Therefore, I need to do everything I can to come up with a solution. I can replicate the issue myself and I do see that resolving email addresses for ExchangeUserAddressEntries is painfully slow. I should also mention that the client mentions that if they use LDAP only instead of GAL, then the resolving seems to go quicker.

    Do you have any experience with the slowness of MAPI in Online Mode? Or are you aware of any workaround? Or way to debug/solve this? Or alternative API that can be used to resolve the email of these GAL recipients quickly?

    Any ideas are welcome.


    • Edited by Dingoshark Tuesday, November 1, 2016 6:27 PM
    Tuesday, November 1, 2016 6:21 PM

All replies

  • Every time you make a network call it will be  slower than accessing local data. Try to avoid accessing Recipient.AddressEntry and especially AddressEntry object's properties in particular. Most likely the data will be in the message recipient table, which you can access using Recipient,.PropertyAccessor.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, November 1, 2016 7:21 PM