# Send custom HTML email

If you'd like to set your own HTML for an email, use the `html` parameter.&#x20;

{% hint style="warning" %}
Sending HTML over email is a mess. Knowing what email clients support what HTML features can be a full-time job.&#x20;

We recommend using our Visual Drag-and-Drop editor to create a standard-compliant email that will look properly in all email clients. [Learn more](https://docs.encharge.io/transactional-email-api/send-an-email-from-template)
{% endhint %}

To send a custom HTML email, send a request to the API as follows:

```javascript
const axios = require('axios');

// Send a POST request
axios({
  method: 'post',
  url: 'https://api.encharge.io/v1/emails/send?token=yourAPIKey',
  data: {
    "to": "recipient@example.com",
    "from": "sender@acme.org",
    "subject": "Welcome",
    "html": "<div>Hello and welcome, <b>{{ person.firstName }}</b>!</div>",
    /**
   * Optionally, you can include a dictionary of fields to be replaced.
   * For example, passing
   * `{ "loginURL": "https://app.encharge.io/login/3n2l3ad99"}`
   * will replace
   * `{{ loginURL }}` in the email html or subject.
   */
    "templateProperties": {
      "loginURL": "https://app.encharge.io/login/3n2l3ad99"
    }
  }
});
```

{% hint style="success" %}
If you have previously created the recipient  in Encharge, you can use personalization tags, for example `{{ person.firstName }}` in your email's text. See what fields you can use in [Person Fields](https://app.encharge.io/settings/person-fields).
{% endhint %}
