Hi @Andrey Smolkov,
internetMessageHeaders
only supports custom headers starting with x-
or X-
. If you want to provide List-unsubscribe
, you can use the singleValueExtendedProperties
property. For example:
const options = {
authProvider,
};
const client = Client.init(options);
const sendMail = {
message: {
subject: '9/9/2018: concert',
body: {
contentType: 'HTML',
content: 'The group represents Nevada.'
},
toRecipients: [
{
emailAddress: {
address: '******@contoso.OnMicrosoft.com'
}
}
],
singleValueExtendedProperties [
{
id: 'String 0x1045',
value: 'Test Value'
},
],
}
};
await client.api('/me/sendMail')
.post(sendMail);
For the rest of the code, you can refer to this tutorial: Build TypeScript apps with Microsoft Graph.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.