Your receipt for order A-1042
Hi Maya,
Thanks for
your order.
Order A-1042
Total: $48.00
Questions? Reply to this email.
Email for product teams. Pass the data, publish a version, and roll back when you need to. The send call stays put.
A receipt has the same job every time. Pass a name, an order, and a total to make it personal.
render: ({ name, orderId, total }) => ({
subject: `Your receipt for order ${orderId}`,
body: (
<div>
<p>Hi {name},</p>
<h1>Thanks for your order.</h1>
<p>Order {orderId}</p>
<p>Total: {total}</p>
<p>Questions? Reply to this email.</p>
</div>
),
})await samva.email.send({
"to": "maya@example.com",
"templateSlug": "order-receipt",
"templateData": {
"name": "Maya",
"orderId": "A-1042",
"total": "$48.00"
}
});Your receipt for order A-1042
Hi Maya,
Order A-1042
Total: $48.00
Questions? Reply to this email.
Restore saved source into a draft, preview it, then publish when it is ready.
Samva renders the published template with the data you pass, sends the email, and returns a message id.
Every service that triggers this message references the same template by slug.
Your send code stays put while the email changes underneath it.
Confirmations rendered from the version you published, every time.
The reset copy lives in the template, so send calls carry only the data.
Onboarding mail you can rewrite without a deploy.
One layout, filled with data on the schedule you send it.
A reusable email template with saved source and published versions. Reference it by templateId or templateSlug and pass templateData instead of inline subject and HTML.
Edit, save, and publish a new version. Sends using the current publication pick it up through the same template reference. Sends pinned to an exact publication keep using that publication.
Yes. Restore saved source into a draft, preview it, then publish it. Restoring a draft does not change the published email.
Pass templateData on the send call with the values the template expects, keyed by name. Samva renders the published version server-side and sends the result, so the layout and the data stay separate.
Yes. Render and preview a template's output before publishing, so you see the finished email before it reaches a version that sends.
Sign up and send your first email from a version you published.