Sends a triggered email to the current member.
To learn more about triggered emails, see:
Before calling emailMember()
you need to set up at least 1
triggered email.
This method only sends an email to the current member. You can get that member's ID using the _id
property
of the currentMember
(SDK | Velo).
If the specified triggered email contains
variables,
you can specify values for those variables using the optional options
parameter.
The values specified must be strings. If the object you
specify for the options
parameter does not contain a key:value
pair for a
variable in a triggered email, the fallback value defined when creating
a triggered email is inserted in place of the variable.
Note that creating a triggered email
generates a code snippet
for each email template. The generated code includes the email's ID and keys for all the
email's variable names. Copy and paste the snippet into your code and define values for the toUser
property and for each
variable key. To learn how to use the generated snippet in your code, see
How to Send a Triggered Email with Code.
Note: The frontend APIs are only partially functional when previewing a site. View a published version of a site to see their complete functionality.
ID of the triggered email to send.
ID of the current member to send the email to.
Variable values to insert into the email.