Google Conversations/Threads Caused By Same X-Message-IDs When Sending In Batches

Difference Between X-Message-ID (headers) and SendGrid Message ID (activity feed)

It is expected that emails sent in a batch will utilize a similar message ID. Those message IDs are formed from the x-message-id that is returned with the 202 response when actually sending mail. Those message IDs then differ at the very end. Therefore, if you're sending batches of 500, you'd expect to see similar message IDs that only differ with the final integer. (i.e. 42.0, 42.1, 42.2)

 

Then there's the "SendGrid message ID" that is generated on our end for identification purposes within our platform (which is what you see in the activity feed). Those are always unique even when mail is sent in batches. The message ID you see that appears within the headers of an email is alternatively called the SMTP ID. It is expected that the SMTP ID will be the same for all mail sent within the same batch. There is not a change that can be made on our end that would prevent batched emails from utilizing the same SMTP ID.

 

Gmail Conversations and Replies Getting Threaded Within the Same "Conversation" Due to Having the Same X-Message-ID (SMTP ID)

This Google Doc Page clearly lays out that "if you don’t want your messages to be threaded in Gmail, you can either have different subjects or send each message with a unique References header value that will never match another message". 

If you are wanting a different Message-ID (SMTP-ID) associated with every email that you are going to be sending out, you can either make a single API request for each recipient or multiple API requests in the same call (batch). If you do have them all in a single API call, you would want to follow a format similar to this (but sending individual messages to individual groups that include a unique Message-ID header): Sending two different emails to two different groups of recipients

 

As for the unique Message-ID header, you can specify the Message-ID (SMTP-ID) in your request using something like the following:

```
"personalizations": [
       {
           "to": [
               {
                   "email": "email@email.com"
               }
           ],
           "headers": {
               "Message-ID": "<123123@example.com>"
           }
       }
   ]
```

 

Have more questions? Submit a request