I'm working with a Mailgun API update for Mathematica, based this post. After config the API account, emails works so far so good, but I discovered that when I send an attached file, the diacritics get broked.
Here is the code:
HTTPRequest["https://api.mailgun.net/v3/mydomain.com/messages",
<|
Method->"POST"
,"User"->"api:MY_API_KY"
,"Body" -> {
"from" -> "test@mydomain.com"
,"to" -> "me@me.com"
,"subject" -> "With Attachment"
,"text" -> "Diacritics test: àáâãäåçèéêëìíî"
, "attachment" -> File["m.JPG"]
}
|>
]//URLRead[#, "Body"]&
Here are the result, commenting and uncommenting the line: , "attachment" -> File["m.JPG"]

I tried to add the header below, without success too:
,"Headers"-> {"Content-type" -> "multipart/form-data; charset=utf-8"}
Any help is welcome
UPDATE 01
Using the old function URLFetch, I have problem with and without sending a file.
URLFetch["https://api.mailgun.net/v3/mydomain.com/messages",
"Method"->"POST"
,"MultipartElements" -> {
{"from","text/plain"} -> "test@mydomain.com"
,{"to","text/plain"} -> "me@me.com"
,{"subject","text/plain"} -> "Hello YOUR-NAME"
,{"text","text/plain"} -> "Diacritics test: àáâãäåçèéêëìíî"
}
,"Username"->"api"
,"Password"->"MY_API_KY"
]
UPDATE 02
I created a better toy code below using https://httpbin.org, so anyone can execute the test.