Hello GZ,
Thank you for reaching out to Microsoft Support!!
The id: 'String 0x1045' mentioned in the example you provided corresponds to a custom header that is specified in the MIME format of the email. It is not a specific value that you need to derive or generate, it simply represents an arbitrary identifier for the custom email header being added. These kinds of header identifiers are typically used when constructing MIME email data via APIs such as Microsoft Graph. It isn't directly relevant for Graph API calls.
Based on what you’ve provided, you are correctly setting up the email subject, body, and recipients using the Microsoft Graph Java SDK. To include the List-Unsubscribe
and List-Unsubscribe-Post
headers, you'll need to utilize the internetMessageHeaders
property of the Message
object.
This Microsoft Graph API documentation, confirms that the internetMessageHeaders
property can be used to add custom headers when creating a message. While it doesn't explicitly mention List-Unsubscribe
or List-Unsubscribe-Post
, it does state that custom headers can be added to a message during its creation. This aligns with the use case of including these headers for unsubscribe functionality.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.