Send emails to users from your workspace. Make sure that you have configured the email settings in the workspace.
| Version | Description |
|---|---|
| 5.4.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
{
"from": "test.test@test.com",
"subject": "Welcome to the Test Newsletter",
"body": "Thank you for subscribing to the Test Newsletter. If this was not you feel free to unsubscribe by hitting the following button [unsubscribe]",
"dryrun": true
}A valid email address to send mails from.
The subject of the email.
The body of the email. You must use [unsubscribe] for the unsubscription link. You may use [name], [fname], [lname] for the user's full name, first name or last name, respectively. You may use [email] for the user's email.
A boolean value. If true, will only send one email to the same address as in the From parameter.
OK
{
"success": true
}Bad Request
{
"success": false,
"error": "Invalid from address [error-invalid-from-address]",
"errorType": "error-invalid-from-address",
"details": {
"function": "Mailer.sendMail"
}
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}