Skip to content

RenderEmailTemplate

Source: src/AWS/SES/RenderEmailTemplate.ts

Runtime binding for sesv2:TestRenderEmailTemplate.

Bind this operation to an EmailTemplate inside a function runtime to get a callable that renders the template server-side with the given personalization data — useful for previews and for validating template data before a send. The binding grants the function ses:TestRenderEmailTemplate scoped to the template.

// init
const renderTemplate = yield* SES.RenderEmailTemplate(template);
// runtime
const { RenderedTemplate } = yield* renderTemplate({
TemplateData: JSON.stringify({ name: "Ada" }),
});