Toggle menu

sendEmail

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

NameTypeDescription
templateIdString, requiredThe ID of the template to use
emailAddressString, requiredThe email address that the email will be sent to
personalisationObject, optionalAn object containing the different fields to input into the template
referenceString, optionalAn optional reference that can be used to identify an email
replyEmailString, optionalThe email address that any replies will be sent to
apiKeyNameString, optionalSpecify 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": "exampleuser@gossinteractive.com",
        "personalisation": {            
            "firstName": "John",
            "lastName": "Smith",
            "date": "25/12/2016"         
        },
        "reference": "Registration Email Reference",
        "replyEmail": "exampleemail@gossinteractive.com"  
    });  
    return result;
}

Last modified on August 01, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon