Mail

Send electronic mail through the electronic post.

TIP

If the email doesn't send, make sure to check your email configuration. Using a separate SMTP server is recommended.

Endpoints
  POST /:project/mail

Send an Email

Send an email

Parameters

project required

The project you're targetting.

Attributes

to required

User ID, email address, or object in the format { email, name }. You can send an email to multiple people at the same time by passing an array here.

body required

Body of the email.

subject optional

Email subject.

type optional

HTML or plain text

data optional

Key value pairs of variables that can be used in the body.

Returns

Returns an empty body with HTTP status code 204.

Endpoint
  POST /:project/mail
Request
{
  "to": [
    "user@example.com",
    "admin@example.com"
  ],
  "subject": "New Password",
  "body": "Hello <b>{{name}}</b>, this is your new password: {{password}}.",
  "type": "html",
  "data": {
    "name": "John Doe",
    "password": "secret"
  }
}