I am sending a mail using the graph API from a shared mailbox ([email protected]).
There is a .CSV file added to this POST call. The mail is sent with the correct subject and body. However, the attachment is dropped.
The format looks perfect like it should be. Does anyone know why this is being dropped, and how to fix this?
This is my body sent to the endpoint
https://graph.microsoft.com/v1.0/users/[email protected]/sendMail
Body:
{
"saveToSentItems": "true",
"message": {
"attachments": [{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "data.csv",
"contentBytes": "MYFILEINBASE64"
"contentType": "text/csv"
}],
"message": {
"toRecipients": [{"emailAddress": {"address": "[email protected]"}}],
"subject": "Hello from runtime params",
"body": {
"contentType": "Text",
"content": "This is a test mail body."
}
}
}
}
Thanks !
text/plain.