> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skillfactory.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Templates

> Customize the transactional emails sent by the platform

## Email templates

Customize the emails sent automatically by the platform. Each email type has a default template that can be customized with HTML and dynamic variables.

## Available templates

The platform has the following email types:

| Template              | When it is sent                                        | Editable      |
| --------------------- | ------------------------------------------------------ | ------------- |
| **Welcome**           | When a new member is created (with access credentials) | Yes           |
| **Password reset**    | When a user requests password recovery (with OTP code) | Yes           |
| **Password resend**   | When an admin generates a new password for a member    | No (internal) |
| **New content**       | When new lessons or courses are published              | No (disabled) |
| **Certificate ready** | When a completion certificate is generated             | Yes           |

<Note>
  It is not possible to create new template types. In the admin panel, you can customize 3 templates: Welcome, Password reset, and Certificate ready. The password resend template is an internal system template, and the new content template is temporarily disabled.
</Note>

## Dynamic variables

Each template has access to variables that are automatically replaced at send time:

### Welcome

| Variable                | Description        |
| ----------------------- | ------------------ |
| `{{ email }}`           | New member's email |
| `{{ password }}`        | Generated password |
| `{{ nome }}`            | Member's name      |
| `{{ nome_plataforma }}` | Platform name      |
| `{{ site_url }}`        | Platform URL       |
| `{{ logo_image }}`      | Logo URL           |

### Password reset

| Variable                | Description           |
| ----------------------- | --------------------- |
| `{{ email }}`           | User's email          |
| `{{ otp }}`             | OTP verification code |
| `{{ nome }}`            | User's name           |
| `{{ nome_plataforma }}` | Platform name         |
| `{{ site_url }}`        | Platform URL          |

### Certificate ready

| Variable                 | Description           |
| ------------------------ | --------------------- |
| `{{ nome }}`             | Student's name        |
| `{{ course_title }}`     | Completed course name |
| `{{ completion_date }}`  | Completion date       |
| `{{ certificate_code }}` | Validation code       |
| `{{ validation_url }}`   | Public validation URL |
| `{{ nome_plataforma }}`  | Platform name         |

## Edit a template

<Steps>
  <Step title="Go to Admin → Email templates">
    View the list of available templates.
  </Step>

  <Step title="Select the template">
    Click "Edit" on the template you want to customize.
  </Step>

  <Step title="Edit the content">
    Use the editor to modify the subject and the email's HTML body. Insert variables using the `{{ variable }}` syntax.
  </Step>

  <Step title="Save">
    Your changes are saved as a custom version. The original template is preserved.
  </Step>
</Steps>

### Editor

The editor uses Lexical as its foundation and supports:

* Direct HTML editing
* Basic text formatting
* Dynamic variable insertion
* Viewing available tags for each template type

<Info>
  The system validates that required variables are present in the template before saving.
</Info>

## Restore default template

If you customized a template and want to revert to the original:

1. Open the template
2. Click "Restore default"
3. The custom version is removed and the default template is used again

## Security

Templates undergo automatic sanitization to prevent vulnerabilities:

* **Scripts removed** - `<script>` tags are stripped
* **Event handlers blocked** - Attributes like `onclick`, `onerror` are removed
* **Dangerous protocols** - `javascript:`, `data:text/html` links are blocked
* **Allowed tags** - Only email-safe HTML (h1-h6, p, a, img, table, etc.)

## Email provider

The platform uses **Resend** as the email delivery provider.

Emails are sent from `noreply@get.skillfactory.com.br`. If the platform logo is configured, it is automatically included in the email header.

### Email structure

Each email follows this structure:

1. **Header** - Logo and platform name (when available)
2. **Body** - Template content with variables replaced
3. **Footer** - Copyright and automated email notice

If the custom template contains a complete HTML document (with `<!DOCTYPE html>` or `<html>`), it is used directly without the default wrapper.

## Next steps

<CardGroup cols={2}>
  <Card title="Certificates" icon="certificate" href="/en/admin/certificates">
    Configure the certificate email template
  </Card>

  <Card title="Visual customization" icon="palette" href="/en/admin/appearance">
    Configure the logo that appears in emails
  </Card>
</CardGroup>
