Microsoft Graph send email api conversation Index is different

1k views Asked by At

We are integrating the MS Graph API's in our c# application. sending mail is working fine by following this article Send Mail Documentation. But I am facing an issue with ConversationIndex (Mainly Threads).

ConversationIndex of mail sent via API is different than recipients' replies to the same mail. Due to this it is unable to identify the threads.

This is the payload used to send mail. can anybody help me with any key or property I am missing while sending mail?

{
  "message": {
    "subject": "Meet for lunch?",
    "body": {
      "contentType": "Text",
      "content": "The new cafeteria is open."
    },
    "toRecipients": [
      {
        "emailAddress": {
          "address": "[email protected]"
        }
      }
    ],
    "ccRecipients": [
      {
        "emailAddress": {
          "address": "[email protected]"
        }
      }
    ]
  },
  "saveToSentItems": "false"
}
1

There are 1 answers

0
Shweta On

Structure of Conversation Index

[reserved-1B] [timestamp-5B] [GUID-16B] [timestamp-5B][timestamp-5B]…[timestamp-5B]

<-------------Header Block---------------->​<-------------------Child Blocks------------------>

All messages part of the same conversation thread has the same 16-Bytes GUID.

5-Bytes [timestamp] in Header Block: System time when message was received converted into FILETIME format.

5-Bytes [timestamp] in Child Blocks: Child blocks are present only for Outlook messages, to indicate subsequent messages in a thread while keeping the header block attributes same. Every message reply to a conversation adds a [timestamp] at end to create a new conversationIndex.

Relative ordering of messages belonging to same conversation thread: For all messages belonging to same GUID, SORT the messages by conversationIndex values.

Please refer to documentations here to understand better.

Tracking conversations

ConversationIndex property