server.messaging.sendEmail

Sends a message (sms/email) containing the server generated OTP and returns the requestId to be used by other methods.

Syntax

Copy
function server.messaging.sendEmail(to, from, message, {"provider": "FtosEmailNotificationService","subject": "test subject","cc":'[“a“,”b”]',"bcc":'[“x“,”y”]'})
 
Parameter Type Description
from string Email address/Phone number of the sender.
to string Email address/Phone number of the recipient(s).
subject string Email subject (used only if the OTP is sent to an email address).
notificationProvider string

A string defining the provider which will be used to send the email/sms. The following providers are supported: GatewayEmailOTP, CustomEmailProvider and FtosEmailNotificationService.

notificationChannel string

The channel(sms/email) provider which will be used to send the OTP.

Examples