prepareParameters()
Overview
public struct function prepareParameters(
required string recipientType
, required string recipientId
, struct args
, string template = ""
, struct templateDetail
, array detectedParams
)
Prepares email parameters (variables for substituting in subject + body) for the given recipient type and provided args (e.g. could contain user id)
Arguments
Name | Type | Required | Description |
---|---|---|---|
recipientType | string | Yes | The ID of the recipient type whose params we are to prepare |
recipientId | string | Yes | The ID of the recipient |
args | struct | No | Structure of variables sent to the sendEmail() method, should contain enough data to inform the method how to prepare the params. e.g. { userId=idofUserToSendEmailTo }. |
template | string | No (default="") | ID of the template being prepared |
templateDetail | struct | No | Structure with details of the template being prepared |
detectedParams | array | No | Array of parameter names that have been detected in the content - providers can use this to restrict the rendering of parameters to only those necessary |