# MailTemplateRender

The MailTemplateRender type of the TypeScript SDK, which templates.render take or answer.

```ts
type MailTemplateRender = {
  html: string | null
  langUsed: string
  slug: string
  source: ('stored' | 'draft')
  subject: string
  templateVersion: number
  text: string
  variables: MailTemplateVariable[]
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `html` | `string` \| `null` |  |
| `langUsed` | `string` |  |
| `slug` | `string` |  |
| `source` | `('stored' \| 'draft')` | `draft` when the call carried copy to preview, `stored` when it rendered the template's own copy |
| `subject` | `string` |  |
| `templateVersion` | `number` |  |
| `text` | `string` |  |
| `variables` | [`MailTemplateVariable[]`](/docs/sdks/typescript/types/mail-template-variable) |  |

## Used by

| Method | What it does |
| --- | --- |
| [`templates.render`](/docs/sdks/typescript/templates/render) | Render a template without sending it |
