There is a limit in linux that only allow certain amount of bytes in the argument of a single command
I'm not sure if this is an issue with my specific my environment but a 200KB attachment could break this limit
mgc users send-mail post \
--body '{
"message": {
"subject": "hi",
"body": {
"contentType": "text",
"content": "test"
},
"toRecipients": [
{
"emailAddress": {
"address": "[email protected]"
}
}
],
"attachments": [
{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "screenshot.png",
"contentBytes": "'"$(cat ./file.png | base64)"'",
"contentId": "screenshot"
}]
},
"saveToSentItems": "false"
}'