Skip to main content

Type Alias: TemplateConfig

type TemplateConfig: object | object;

Describes how automated emails are rendered or composed—either via inline content (subject/html/text/React) or a provider-managed template id.

  • Inline mode: supply subject plus html, text, and/or react
  • Provider mode: supply templateId plus optional variables

Examples

{ subject: ctx => `Welcome ${ctx.user.name}`, react: WelcomeEmail }
{ templateId: 'd-reset', variables: ctx => ({ link: ctx.links?.resetPassword }) }