使用Outlook/Office 365 REST设置自定义标头 [英] Set a custom header with Outlook/Office 365 REST

查看:109
本文介绍了使用Outlook/Office 365 REST设置自定义标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以

I know it is possible to get the headers from an email with this Outlook REST, but is there a way that we can set custom headers as well? I can't seem to find any documentation.

推荐答案

尝试设置 PS_INTERNET_HEADERS -{00020386- 0000-0000-C000-000000000046}.

Try setting the SingleValueExtendedProperties on the message object. You can try using the property id for PS_INTERNET_HEADERS - {00020386-0000-0000-C000-000000000046}.

使用自定义标头创建新消息可能看起来像这样:

Creating a new message with a custom header might look something like this:

POST https://outlook.office.com/api/beta/me/messages

Content-Type: application/json
{
    ...,
    "SingleValueExtendedProperties": [
        {
            "PropertyId":"String {00020386-0000-0000-C000-000000000046} Name x-my-custom-header",
            "Value":"Some Value"
        }
    ]
}

这篇关于使用Outlook/Office 365 REST设置自定义标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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