FoxPro Programming
Sending email through rest API
Gravatar is a globally recognized avatar based on your email address. Sending email through rest API
  Denis Chassé
  Feb 5, 2024 @ 09:37am

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 <>"],
    "sender": "Test Persons Friend <>",
    "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 <>"
    "attachments": [
            "filename": "test.pdf",
            "fileblob": "--base64-data--",
            "mimetype": "application/pdf"
            "filename": "test.txt",
            "fileblob": "--base64-data--",
            "mimetype": "text/plain"

Thank you.

© 1996-2024