> For the complete documentation index, see [llms.txt](https://edgar-p-yan.gitbook.io/authembed-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edgar-p-yan.gitbook.io/authembed-docs/configuration/email-templates.md).

# Email Templates

Some of authentication strategies of Authembed require to send emails. There are some built-in templates, which look quite good, but in some situations you may need to use your own custom branded templates.

In Authembed templates are stored in directory `/templates`. At this moment (version `v0.1.0`) there are 3 templtes:

* `/templates/email-verification.hbs` - used to send email verification link;
* `/templates/generated-password.hbs` - used to send the generated password when registering through Autogenerated Password Strategy;
* `/templates/updated-password.hbs` - used when reseting password that was generated through Autogenerated Password Strategy.

Each of those templates end with the extension `.hbs` which stands for Handlebars. But in reality templates are just regular HTML files, except that they also have somewhat called "placeholders". These placeholders are then replaces with actual values when sending messages.&#x20;

Let's construct some basic custom templates!

### Custom email-verification template example

`email-verification` template expect only one placeholder:

* `confirmationUrl` - the url which will verify user's email

And here is an example of a simple custom template:

{% code title="/templates/email-verification.hbs" %}

```markup
<html>
  <body>
    <h1>My Company - Email verification</h1>
    <p>
      Please click this link to verify your email:
      <a href="{{ confirmationUrl }}">{{ confirmationUrl }}</a>
    </p>
  </body>
</html>
```

{% endcode %}

### Custom generated-password template example

`generated-password` template expects only one placeholder:

* `password` - the autogenerated password that user can use to login

And here is an example of a simple custom template:

{% code title="/templates/generated-password.hbs" %}

```markup
<html>
  <body>
    <h1>My Company - Here is your password for authentication</h1>
    <p>
      Please use this password to log in to your account: {{ password }}
    </p>
  </body>
</html>
```

{% endcode %}

### Custom updated-password template example

`updated-password.hbs` template expects only one placeholder:

* `password` - new autogenerated password after the old one was reset

And here is an example of a simple custom template:

{% code title="/templates/updated-password.hbs" %}

```markup
<html>
  <body>
    <h1>My Company - Here is your new password for authentication</h1>
    <p>
      Please use this password to log in to your account: {{ password }}
    </p>
  </body>
</html>
```

{% endcode %}
