OpenFolia

Send a test email

POST
/mail/test

Queues a test email to the signed-in administrator’s own address, in language (else the installation’s), with the branding. It is sent in the background, as every email is, and retried; a failure for good is recorded as mail.failed. Recorded as mail.test. Needs the admin.roles permission.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Request Body

application/vnd.api+json
  1. body
data*

Response Body

application/vnd.api+json
  1. response
data*

id is the message’s ID (a UUID), as the audit log names it.

Example Request
curl -X POST 'http://localhost:3000/mail/test' \  -H 'Content-Type: application/vnd.api+json' \  -d '{  "data": {    "type": "MailTest"  }}'
Example Response
{  "data": {    "type": "MailMessage",    "id": "string",    "attributes": {      "template": "test",      "to": "string",      "language": "en",      "status": "queued"    }  }}