Doing a draft and adding an attachment is not very efficient and introduce a lot of point of failure.
Fortunately, this can be one all in one go.
Here is an example with 1 image. That can be pasted in Graph Explorer: https://developer.microsoft.com/graph/graph-explorer/
URL: https://graph.microsoft.com/v1.0/me/sendMail (as Post)
Change the email from to be yours. Notice the contentBytes is a base64 of the image. It's a jpeg, but this also works with png.
Pay attention to the cid, it should be a unique id for your images.
{
"message": {
"subject": "Test graphAPI",
"toRecipients": [{ "emailAddress": {"address": "[email protected]"}}],
"body": {
"contentType": "html",
"content": "<div>This is a small jpeg: <img src=\"cid:yourcid\"></div>"
},
"attachments": [
{
"contentType": "image/jpg",
"contentId": "yourcid",
"isInline": true,
"@odata.type": "#Microsoft.OutlookServices.FileAttachment",
"contentBytes": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsICAoIBwsKCQoNDAsNERwSEQ8PESIZGhQcKSQrKigkJyctMkA3LTA9MCcnOEw5PUNFSElIKzZPVU5GVEBHSEX/2wBDAQwNDREPESESEiFFLicuRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUX/wAARCAAgACADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERU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