How to provide list-unsubscribe-post header using Microsoft Graph API

Viktoria 5 Reputation points
2024-02-27T11:17:35.7433333+00:00

Hello! Our team use Microsoft Graph API to send emails. We need to add List-Unsubscribe and List-Unsubscribe-Post headers to our emails.
According to all information that we have found, the only one way to add List-Unsubscribe-Post header is to use MIME message format. https://learn.microsoft.com/en-us/answers/questions/1460824/sending-emails-using-ms-graph-with-list-unsubscrib

If you need to include also List-Unsubscribe-Post, the solution is more complicated, because there is no way to add List-Unsubscribe-Post via SingleValueExtendedProperties. You need to send message in MIME format.

Great blog post how to create a MIME message for Graph API is here

We have tried this way but the header still does not appear in the sent message. Headers were added in the message:

enter image description here

But in the sent message there only one header exists:

enter image description here

So what can be the reason of not adding both headers to the email? And how we actually do this according to new rules from Google that both headers should be added to the emails.

Starting in February 2024 major companies like Google and Yahoo will be enforcing strict rules on their email platforms in order to fight spam further. In essence what used to be “best practices” will now become requirements. Although we may already be following best practices we will still need to make changes to the way we send emails.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,443 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.