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

NameTypeRequiredDescription
recipientTypestringYesThe ID of the recipient type whose params we are to prepare
recipientIdstringYesThe ID of the recipient
argsstructNoStructure of variables sent to the sendEmail() method, should contain enough data to inform the method how to prepare the params. e.g. { userId=idofUserToSendEmailTo }.
templatestringNo (default="")ID of the template being prepared
templateDetailstructNoStructure with details of the template being prepared
detectedParamsarrayNoArray of parameter names that have been detected in the content - providers can use this to restrict the rendering of parameters to only those necessary