Create and publish
Use the visual Email studio in Templates or Marketing to drag in headings, text, images, buttons, columns, hero sections, product cards, social links, lists and discount codes. Edit text on the canvas; change colours, spacing and fonts in the settings. Desktop/mobile previews, starter layouts and undo/redo are included. Save your draft to preserve its editable design. Images use your hosted HTTPS URLs. Existing HTML emails open in HTML mode. Marketing automatically adds the sender address and personal unsubscribe footer.
Create a template, save versions and publish one. Use template_id and variables instead of html/text. A published template supplies the subject; you can omit it from template-based sends. Variables use {{name}}, with HTML escaping; customer code is never executed. Use POST /templates/:id/preview with a variables object and optional version to render through the same escaping rules. The dashboard displays this in a sandboxed iframe. Duplicate creates a draft copy. Test sends use the latest version and a recipient email you choose, with all normal approval, sender, suppression, quota and rate checks. Review template output and links before publishing.
In SDK 0.3.0, use panda.templates.test(id, { from, to, variables }) or panda.campaigns.test(id, to). Each requires a chosen recipient; neither silently picks an infrastructure address. Both accept an optional { idempotencyKey } argument. In MCP 0.3.0, templates_test and campaigns_test require to and explicit send confirmation. Previewing alone sends no email and uses no sending quota.
Send a published template
await panda.emails.send(
{
from: "Your app <hello@your-verified-domain.com>",
to: ["your-own-address@example.com"],
template_id: "tpl_your_template_id",
variables: { firstName: "Alex" },
},
{ idempotencyKey: "welcome-account-123" },
);
Use {{firstName}} in the template. Variables are escaped as content; they do not execute customer code. Do not send conflicting content sources such as template_id and custom HTML together.
Preview before publishing
Preview with representative variables and inspect desktop, mobile and plain-text output. Previewing does not send mail or use sending quota. A test send is a real email to a recipient you choose and uses normal quota and readiness checks.
Read Email studio for visual editing and images for uploads and hosted assets.