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.

Resources/mail_template_types/my_mail_template_type.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"
        }
    }
}

Run bin/console plugin:update <PluginName> to update mail template types.

Last updated