Confirmation emails
Mustache templates, double opt-in flow
Attach an email template to an endpoint under /app/endpoints. When a submission comes in with an email field, form-relay renders the template and sends it via Resend.
Mustache syntax
Use {{var}} to insert a variable from the submission payload. Add a fallback with {{var|fallback}}.
<!-- Template body (HTML) -->
<p>Hey {{name|there}},</p>
<p>Thanks for joining. Tap the link below to confirm your email.</p>
<p><a href="{{confirm_url}}">Confirm subscription</a></p>
<p>
Sent to {{email}} — reply to this email if you have questions.
</p>Double opt-in flow
Turn on "Require double opt-in" on the endpoint. On submission, form-relay generates a unique token and injects {{confirm_url}} into the template automatically. The recipient opens that URL and presses Confirm. Opening the link alone does not confirm the lead. Links expire after seven days. You can filter your leads list to confirmed-only when setting up broadcasts.
Authoring email HTML offline
The template editor accepts raw HTML. To author with React Email components, install @react-email/components in a scratch project, write the email as a React component, then call render(<YourEmail />) to get the HTML string. Paste it into the template editor here. The Mustache {{var}} syntax works inside any string in your component, so you can write {{name|there}} directly in your JSX before calling render().