如何在 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
这是没有分享?
最佳答案
为什么不在发送消息时删除用户属性(Application.ItemSend)?
关于c# - 共享 Outlook MailItem UserProperties,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25887854/