Exchange ActiveSync Persistence of Custom MailItem Properties RRS feed

  • Question

  • I have an Outlook add-in where I create several custom properties for mail items that we are processing and they are generally set before an email is actually sent.  If the email server is Exchange or a POP server then after the email is sent I am able to access the same properties from the sent item.

    When using Exchange ActiveSync in Outlook 2013 it appears that custom mail item properties (e.g. those defined in the MailItem.UserProperties collection, or via MailItem.PropertyAccessor SetProperty) are lost after the email is sent.  That is, if you set a property on a new email before it is sent, the sent item will not include that property.

    I did find some strange behavior such that if you add a property to the UserProperties collection of the mail item and send that email, the sent item's UserProperties collection will be empty but the sent item will have the corresponding MAPI property that gets auto-created.  For instance, if I add an item to the UserProperties collection called TestProperty then Outlook will also create a MAPI property called TestProperty.  After sending the email, the sent item will have the MAPI property TestProperty but the UserProperties collection will be empty.  So to get things to work I would need to define properties in the UserProperties collection and then retrieve them as a standard MAPI property from the sent item.

    I would like to know if this is expected behavior.  In the end I need some way to store information about a particular email that is being sent and associate that information with the corresponding sent item.

    Monday, March 4, 2013 6:32 PM

All replies

  • Hi Mcoburn,

    Thank you for posting in the MSDN Forum.

    I'll consult your issue with my colleague. You'll be informed if there's any update.

    Thank you for your patience and understanding.

    Best regards,

    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 6, 2013 6:25 AM
  • Has there been any progress on this item or would it be better to open a support ticket with Microsoft?
    Monday, March 11, 2013 7:36 PM
  • Hi,

    EAS has no facility for custom properties it has a fixed schema and is non-extensible If you send an email using EAS, though properties can be set in MIME x-headers. However, you could not read those properties back unless somehow that same item was read back as MIME.


    Shailesh G. Rajput
    Microsoft Developer Support - Messaging & Collaboration

    Friday, April 5, 2013 10:17 PM