Sending email (v1)
Preview / Alpha
This step is in preview / alpha. It is not yet available in the flow editor and does not send any email yet. Its functionality and documentation can still change.
Sends an informational email to the user's email address
Sending email (v1) sends an informational email to the email address of an ExtendedIdentity data block, supplied at session creation or produced by an earlier step in the flow. It is the email counterpart of Sending SMS (v1) (SEND_SMS:v1) and is intended for journeys that begin on one channel and need the user to continue from their inbox.
Key features
- Background step: no Player screen is rendered and the user is not interrupted.
- Recipient from the identity: the step emails the
emailAddressof anExtendedIdentitydata block. When that block carries no email address, the step takes theunreachableroute instead of failing the session. - Customer-supplied content: an optional subject and an HTML body, a plain-text body or both are separate
MessageTemplatedata blocks supplied at session creation, so the customer controls the wording, the markup and the language. At least one body is required; the subject is optional. Declare onemessageTemplateinput per template on the Start step and wire each to the step withinputMapping. - Reserved placeholder: the only supported placeholder is
{session.url}, which the step replaces with the full Player link. The placeholder may appear anywhere in a template, any number of times; using no placeholder is also valid. Unlike Sending SMS (v1) (SEND_SMS:v1), the link is not shortened. - Template rules: the HTML and plain-text bodies may contain links and markup but no control characters other than tabs and line breaks, and no invisible or bidirectional formatting characters. These rules are checked at session creation, on every
messageTemplateinput of the flow. - Content is not sanitised: the bodies are your content, sent to your own end users, so styles, links and markup are delivered as written. The platform checks them for control and hidden characters only. If you build a preview of an email, sanitise the HTML before you render it.
- Subject rules: the subject is optional. When none is supplied, the email is sent with a single space as its subject, because the messaging service rejects an empty one. A subject you supply must be a single line of at most 998 UTF-16 code units. The step checks this when it sends the email, not when the session is created, so a subject with a line break is not rejected at session creation.
- One set of templates per step: a flow may contain several Sending email steps. Give each its own
messageTemplateinputs, so the content of each email is supplied separately at session creation. The flow editor names thememailSubject,emailTextandemailHtmlfor the first step, thenemailSubject2,emailText2andemailHtml2for the second, and so on. Steps that point at the same inputs send the same content. - Fixed sender: the sender address is set by the messaging service and cannot be changed. Use the
replyTooption to receive replies at your own address. - Fire and forget: the step does not wait for delivery or track it. A
sentroute means the mail relay accepted the email, not that it reached the recipient's mailbox. If the messaging service is rate limiting or briefly unavailable, the step retries the send before it fails; an email the relay has already accepted is not sent again by design, but a timeout after acceptance can still produce a duplicate. - Two routes:
sentwhen the messaging service accepts the email,unreachablewhen the identity carries no email address or the service reports that the recipient cannot receive email.
Configuration
| Option | Type | Required | Description |
|---|---|---|---|
replyTo | string<email> | No | Address that receives the recipient’s replies. Optional. The sender address is fixed by the messaging service and cannot be changed. |
Input data blocks
| Input slot | Data block | Required | Description |
|---|---|---|---|
extendedIdentity | ExtendedIdentity | Yes | Identity whose emailAddress is messaged. A missing address routes the step to unreachable. |
htmlTemplate | MessageTemplate | No | The HTML body of the email. Optional, but at least one of htmlTemplate and textTemplate must be mapped. Declare a messageTemplate input on the Start step and wire it here with inputMapping. |
textTemplate | MessageTemplate | No | The plain-text body of the email, shown by mail clients that do not display HTML. Optional, but at least one of htmlTemplate and textTemplate must be mapped. Declare a separate messageTemplate input on the Start step and wire it here with inputMapping. |
subjectTemplate | MessageTemplate | No | The subject line of the email, as plain text. Optional: when no subject is supplied the email is sent with a single space as its subject, because the messaging service requires one. It must be a single line of at most 998 UTF-16 code units; the step checks this when it sends the email, not at session creation. Declare a separate messageTemplate input on the Start step and wire it here with inputMapping. |
Routes
| Route | Description |
|---|---|
sent | The messaging service accepted the email. This confirms hand-over to the mail relay, not delivery to the recipient’s mailbox. |
unreachable | No email address was available in the extended identity, or the messaging service reported that the email cannot be delivered. |
Output data blocks
| Route | Data blocks produced |
|---|---|
sent | — |
unreachable | — |
Example payloads
At session creation, supply the identity and one template per declared input:
{
"input": {
"extendedIdentity": {
"emailAddress": "jane.doe@example.com"
},
"emailHtml": {
"template": "<p>Hello,</p><p><a href=\"{session.url}\">Continue your verification</a></p>"
},
"emailSubject": {
"template": "Continue your verification"
},
"emailText": {
"template": "Continue your verification here: {session.url}"
}
},
"metadata": {
"subjectId": "customer-subject-id"
}
}