outlook - 如何将自定义属性添加到 Outlook MailItem 的 InternetHeaders
问题描述
我需要从 VSTO 加载项将自定义 InternetHeader x-auth-guid 添加到 Outlook 收件箱(在 Exchange 帐户中)中的现有 MailItem。类似于此处描述的内容 https://docs.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/dd633654(v=exchg.80) 但没有 EWS。使用 EWS 的代码工作并执行以下操作:
extendedFieldURI.propertyName = "x-auth-guid"
extendedFieldURI.distinguishedPropertySetId = "InternetHeaders"
property.extendedFieldURI = extendedFieldURI
property.value = xauthGuid
message.addExtendedProperty(property)
但在两个 PropertyAccessor 的加载项中,例如:
mailItem.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/x-auth-guid", xauthGuid);
mailItem.Save();
和救赎
rdoMail.Fields["http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/x-auth-guid"] = xauthnGuid;
rdoMail.Save();
似乎不起作用。我错过了什么吗?
解决方案
推荐阅读
- javascript - Fancytree:在 DOM 中可见的新子项(通过 LacyLoad 加载)之后的事件
- node.js - 如何在 node.js 应用程序中使用 fastify-ws 向所有连接的套接字发送 http 响应?
- html - Vuejs - 根据当前选项卡动态更改数据表的项目
- android - 在 Wear OS 上禁用“覆盖屏幕进入睡眠模式”手势
- javascript - 如何在 jQuery $.ajax 请求中获取请求 url
- java - 如何使用 JSqlParser 添加新条件?
- c++ - 我想详细了解 C++ 中表达式和语句之间的区别。请选择具体的例子来解释
- rest - 从 Google App Script 调用 REST API Magento 2 出现问题 - ROBOTS Exception
- android - [Android.Emulator].无法将文件推送到 Android Q 和 R 上的 /system 文件夹
- api - Salesforce REST API upsert 不更新或插入记录