So, in the documentation for the mail library, there is a field that should’ve been specific to the content-type of the body.
It works perfectly when I’m sending mail without an attachment.
But, if I do have an attachment, the message is screwed up.
See the original messages below:
When I do include the content-type of the body:
I think this is a bug. We set the content-type header on the message, but when there are attachments we should have set it on the text part, not in the multipart.
You can try something as a workaround (until we fix it), but I’m not sure if it will work:
Leave the body of the message empty.
Add an extra attachment that will contain the body.
In the extra attachment set the mimeType=“text/html”.
In the extra attachment, set the message text as data using the io lib.