如何将自定义互联网 headers 添加到电子邮件?
How to add custom internet headers to emails?
有人可以提供如何创建自定义 Internet headers 并将其添加到 mailItem 以及以后如何阅读它们吗?我正在尝试将关键字附加到发送的每封电子邮件,以便另一个具有相同 add-in.
的 Outlook 客户端可以阅读它
假设您正在编写一个 Outlook 插件(基于您的标签)。处理您当前的邮件项目(草稿形式的电子邮件)...
// Describes your Custom Header
string PS_INTERNET_HEADERS = "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/Custom-Property-Name";
// Sets Your Custom Header
CurrentMailItem.PropertyAccessor.SetProperty(PS_INTERNET_HEADERS, "ValueOfCustomProperty" );
// Reads Your Custom Header
string valueResult = CurrentMailItem.PropertyAccessor.GetProperty(PS_INTERNET_HEADERS);
你可能会逃脱这样的事情:
// Sets Your Custom Header
CurrentMailItem.PropertyAccessor.SetProperty("CustomHeaderName", "ValueOfCustomProperty" );
// Reads Your Custom Header
string valueResult = CurrentMailItem.PropertyAccessor.GetProperty("CustomHeaderName");
有人可以提供如何创建自定义 Internet headers 并将其添加到 mailItem 以及以后如何阅读它们吗?我正在尝试将关键字附加到发送的每封电子邮件,以便另一个具有相同 add-in.
的 Outlook 客户端可以阅读它假设您正在编写一个 Outlook 插件(基于您的标签)。处理您当前的邮件项目(草稿形式的电子邮件)...
// Describes your Custom Header
string PS_INTERNET_HEADERS = "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/Custom-Property-Name";
// Sets Your Custom Header
CurrentMailItem.PropertyAccessor.SetProperty(PS_INTERNET_HEADERS, "ValueOfCustomProperty" );
// Reads Your Custom Header
string valueResult = CurrentMailItem.PropertyAccessor.GetProperty(PS_INTERNET_HEADERS);
你可能会逃脱这样的事情:
// Sets Your Custom Header
CurrentMailItem.PropertyAccessor.SetProperty("CustomHeaderName", "ValueOfCustomProperty" );
// Reads Your Custom Header
string valueResult = CurrentMailItem.PropertyAccessor.GetProperty("CustomHeaderName");