Hello dashandwerk.net (Frank Lehmann),
Thanks for reaching out!
This error occurs because your payload is not in a valid JSON format. You have to escape the quotation marks. Use \"
instead of "
. Additionally, the value of "saveToSentItems" property should be a Boolean instead of string.
Please re-check your JSON body and try to execute the send mail graph endpoint again.
I've modified the request body you were using and now it's giving expected response.
{
"message": {
"subject": "Hallo Welt",
"body": {
"contentType": "html",
"content": "<html><body>Hello<br>Mit freundlichem Gruß<br><br>dashandwerk.net<br>Frank Lehmann<br>Lindenstrasse 10a<br>28755 Bremen<br><br>Tel:0421-56507289<br>Mail: ******@dashandwerk.net<br><br><br><a href=\"https://reviewforest.org/dashandwerk\">Für jede Bewertung pflanzen wir einen Baum !</a></body></html>"
},
"toRecipients": [
{
"emailAddress": {
"address": "shivam@6***bg.onmicrosoft.com"
}
}
]
},
"saveToSentItems": true
}
Hope this helps. If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.