Exchange ActiveSync自定义MailItem属性的持久性 [英] Exchange ActiveSync Persistence of Custom MailItem Properties

查看:106
本文介绍了Exchange ActiveSync自定义MailItem属性的持久性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Outlook加载项,我为我们正在处理的邮件项创建了几个自定义属性,它们通常在实际发送电子邮件之前设置。  如果电子邮件服务器是Exchange或POP服务器,则在发送电子邮件后,我可以
从发送的项目访问相同的属性。


使用Exchange ActiveSync时在Outlook 2013中,看起来自定义邮件项属性(例如,在MailItem.UserProperties集合中定义的那些属性,或通过MailItem.PropertyAccessor SetProperty)在发送电子邮件后丢失。  也就是说,如果
在发送新电子邮件之前设置了一个属性,则发送的项目将不包含该属性。


我确实发现了一些奇怪的行为,例如如果您将一个属性添加到邮件项的UserProperties集合并发送该电子邮件,则发送项的UserProperties集合将为空,但发送的项将具有相应的MAPI属性,即
将自动创建。  例如,如果我将一个项添加到名为TestProperty的UserProperties集合中,那么Outlook还将创建一个名为TestProperty的MAPI属性。  发送电子邮件后,发送的项目将具有MAPI属性TestProperty
但UserProperties集合将为空。  所以为了让事情变得有效,我需要在UserProperties集合中定义属性,然后从发送的项目中将它们作为标准MAPI属性检索。


我想知道这是否是预期的行为。  最后,我需要一些方法来存储有关正在发送的特定电子邮件的信息,并将该信息与相应的已发送项目相关联。

解决方案

Hi Mcoburn,


感谢您在MSDN论坛上发帖。


我会向我的同事咨询您的问题。如果有任何更新,我们会通知您。


感谢您的耐心和理解。


祝你好运,


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.

解决方案

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,


这篇关于Exchange ActiveSync自定义MailItem属性的持久性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆