Description
Sends an email to the provided email address. It will use a combination of the templateId and personalisation to provide the contents of the email.
Parameters
| Name | Type | Description |
|---|---|---|
| templateId | String, required | The ID of the template to use |
| emailAddress | String, required | The email address that the email will be sent to |
| personalisation | Object, optional | An object containing the different fields to input into the template |
| reference | String, optional | An optional reference that can be used to identify an email |
| replyEmail | String, optional | The ID of the email address that any replies will be sent to |
| apiKeyName | String, optional | Specify the name of the API key you want to use. Names and keys are defined in the worker configuration. If not supplied the default will be used |
Example Request
function(params, credentials) {
let result = this.callWorkerMethod("govnotify", "sendEmail", {
"templateId": "00000000-0000-0000-0000-000000000000",
"emailAddress": "[email protected]",
"personalisation": {
"firstName": "John",
"lastName": "Smith",
"date": "25/12/2016"
},
"reference": "Registration Email Reference",
"replyEmail": "8e222534-7f05-4972-86e3-17c5d9f894e2"
});
return result;
}
Last modified on 18 May 2026
