Send mail using api request

Hey everyone

I am practising making API requests with Microsoft Graph. My goal is to send a simple mail to an employee’s mailbox.
How does my body needs to be formatted? The code under here throws an error.

Thanks!

{
“message”: {
“subject”: “Your email subject”,
“body”: {
“contentType”: “Text”,
“content”: “Hello, this is the email content.”
},
“toRecipients”: [
{
“emailAddress”: {
“address”: “recipient@example.com
}
}
]
}
}

@uiStijn

first include a doublequote(") at the start and end of the whole string you provided…

second replace all double quotes(") with double doublequotes("") except the first and last

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.