> For the complete documentation index, see [llms.txt](https://dustinsimon.gitbook.io/shopware-utils/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dustinsimon.gitbook.io/shopware-utils/adding-resources/mail-template-types.md).

# Mail template types

New mail template types can also be brought by your plugin or bundle and simply defined in a json file.

For each mail template type define a json file in the *Resources/mail\_template\_types/* directory of your plugin or bundle. The file name must equal the technical name.

Mail template types will automatically be installed, updated and uninstalled. If a mail template type is in use it won't be uninstalled.

{% code title="Resources/mail\_template\_types/my\_mail\_template\_type.json" %}

```json
{
    "technicalName": "my_mail_template_type",
    "availableEntities": {                        // optional
        "customer": "customer"
    },
    "templateData": {                             // optional
        "foo": "bar"
    },
    "translations": {
        "de-DE": {
            "name": "Mein Mail-Template Typ"
        },
        "en-GB": {
            "name": "My mail template type"
        }
    }
}
```

{% endcode %}

{% hint style="info" %}
Run `bin/console plugin:update <PluginName>` to update mail template types.
{% endhint %}
