FoxPro Programming
Sending email through rest API
Hello all,
I send emails through a rest API.
In the subject I want to send characters with an accent. For example I want to send the following text as a subject.
"L'été est de retour" which translates in english to "The summer is back" (For you curious people).
Not a big deal in "html_body" because I will be able to define the characters to add. For example e will become an é (& #233).
Anybody can tell me how I can add accentuated characters in "subject" field in the json construct?
{
"api_key": "api-40246460336B11E6AA53F23C91285F72",
"to": ["Test Person <test@example.com>"],
"sender": "Test Persons Friend <test2@example.com>",
"subject": "Hello Test Person",
"text_body": "You're my favorite test person ever",
"html_body": "<h1>You're my favorite test person ever</h1>",
"custom_headers": [
{
"header": "Reply-To",
"value": "Actual Person <test3@example.com>"
}
],
"attachments": [
{
"filename": "test.pdf",
"fileblob": "--base64-data--",
"mimetype": "application/pdf"
},
{
"filename": "test.txt",
"fileblob": "--base64-data--",
"mimetype": "text/plain"
}
]
}
Thank you.
![](https://weblog.west-wind.com/images/Sponsors/Websurge-Display.png)