如何在Outlook.MailItem上设置以后不会与收件人共享的属性?
示例代码:
Outlook.UserProperties mailUserProperties = null;
Outlook.UserProperty mailUserProperty = null;
try
{
mailUserProperties = mail.UserProperties;
mailUserProperty = mailUserProperties.Add("TestUserProperty",
Outlook.OlUserPropertyType.olText);
mailUserProperty.Value = "test123";
mail.Save();
}
catch
{
}
finally
{
if (mailUserProperty != null) Marshal.ReleaseComObject(mailUserProperty);
if (mailUserProperties != null) Marshal.ReleaseComObject(mailUserProperties);
}然后,如果电子邮件是通过Exchange发送的,则在收件人的系统上获取其TestUserProperty仍将返回test123,因此该属性将与收件人共享。SMTP不会出现这种情况。
那么,有没有办法(a)创建一个不与接收者共享的用户属性,或者(b)以某种完全不同的方式将数据附加到不共享的Outlook.MailItem?
发布于 2014-09-17 22:12:48
为什么不在发送消息时删除用户属性(Application.ItemSend)?
https://stackoverflow.com/questions/25887854
复制相似问题