ftos.messaging.send

IMPORTANT!  
Starting with v24.3.0, this is renamed from sendMail to ftos.messaging.send.

Sends an email using a predefined template. It uses the MessageQueue entity to store the email body.

Emails are sent:

This is suitable for business logic modules of business service components.

Syntax

For v24.3.1 and before:

Copy
function ftos.messaging.send(templateName: string, to: string[], tokens: any, attachments: any,  cc: string[], string providerName): void
 
For v24.3.2 and above:
Copy
function ftos.messaging.send(templateName: string, to: any, tokens: any, attachments: any,  cc: any, channelProviderName:string): void
 
Parameter Description
templateName Name of a predefined email template to be used.
to Recipient's email address.
tokens Keys for substitution. They are defined as properties of an object and replaced with their values. Tokens are enclosed in brackets in the email template body (e.g., {accountName}).
attachments The files to be attached to the email. This is a JSON object with its key-value pairs representing:
  • key – The name of the file as it will be attached to the email. When attaching multiple files, you must provide unique names for each of them.
  • value – Unique internal ID of the corresponding file (real name) as it is stored on the FintechOS server.
Both names should include the file extension.
cc Array of strings containing the Carbon Copy email recipients.
providerName Available with v24.3.1. If this parameter is not passed or is null/empty, then the provider specified in Configuration Manager key EmailChannelProviderName is used.

channelProviderName

Available starting with v24.3.2. If this parameter is not passed or is null/empty, then the provider specified in Configuration Manager key EmailChannelProviderName is used.

Examples