Send a plain-text email

To send a plain-text email (i.e. one that appears to be sent manually) via the Encharge Transactional Email API, specify the text parameter. You'll also need to provide the email subject as subject and the sender email as from

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.

const axios = require('axios');

// Send a POST request
  method: 'post',
  url: '',
  data: {
    "to": "",
    "from": "",
    "subject": "Welcome",
    "text": "Hello and welcome, {{ person.firstName }}!",
   * Optionally, you can include a dictionary of fields to be replaced.
   * For example, passing
   * `{ "loginURL": ""}`
   * will replace
   * `{{ loginURL }}` in the email text or subject.
    "templateProperties": {
      "loginURL": ""

Last updated