Set a custom header with Outlook/Office 365 REST

后端 未结 1 823
我在风中等你
我在风中等你 2021-01-06 00:48

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 documenta

相关标签:
1条回答
  • 2021-01-06 01:15

    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"
            }
        ]
    }
    
    0 讨论(0)
提交回复
热议问题