ftos.messaging.sendNoEx

IMPORTANT!  
Starting with v24.3.0, this is renamed from sendMailNoEx to ftos.messaging.sendNoEx.

Sends an email using a predefined template.

IMPORTANT!  
Starting with v22.1.9, the email queue is managed by job servers.
For v22.1.8 and prior, in case of errors (email address or SMTP), does not raise an exception, it continues the workflow execution.

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

Syntax

For v22.1.9 and above:

Copy
function ftos.messaging.sendNoEx(templateName: string, to: string[], tokens: any, attachments: any, cc: string[], string providerName): boolean
 
For v22.1.8 and prior:
 
Copy
function ftos.messaging.sendNoEx(templateName: string, to: string[], tokens: any, sendAsync: boolean, attachments: any, useDefaultSender: boolean, cc: string[], from: string): boolean
 
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}).
sendAsync(for v22.1.8 and prior)
  • true – Wait for a response before proceeding with the workflow.
  • false – Don't wait for a response before proceeding with the workflow.
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.
useDefaultSender(for v22.1.8 and prior)
  • true – Use the default sender email address set in the Web.config file (<add key="DefaultFromEmail" value="" />).
  • false – Use the current user's account email address as the sender (if you execute this method in the context of a user with a valid email address).
cc Array of strings containing the Carbon Copy email recipients.
from(for v22.1.8 and prior) Specific sender email address which will override the default sender or the current user's account email address (see useDefaultSender).
providerName (for v24.3) If this parameter is not passed or is null/empty, then the provider specified in Configuration Manager key EmailChannelProviderName is used.

Return Value

Examples