Custom email theme files

In the situations described below, you can override the default emails that are sent out by Plate, by creating a theme file in the mails folder.

In the email you can use the following variables:

See the variables used per specific email_type as described below.

Authentication

confirm_email

For authentication confirmation emails, create a theme file in mails/authentication/[authentication_type_plural_name]/confirm.plate.

In the email you can use the following additional variable:

  • confirmation_url

Example:

Hi {{ user.name }}, Welcome to {{ site.name }} ({{ site.domain }}). Your email is {{ user.email }}. Please confirm: {{ confirmation_url }}.

You can setup the redirect after user confirm their email address as: redirect_to_url param. E.g

{{ confirmation_url }}&redirect_to_url=http://www.rubyonrails.org

Custom Email Subject

It is possible to create a custom subject through a separate theme file. The theme file needs to be named after the specific email type. Create the theme file in:

mails/authentication/[authentication_type_plural_name]/confirm_subject.plate

Using this custom subject will override the default subject for confirm email type. It is not possible to use newlines in your subject. These will automatically be converted to with spaces.

 

reconfirm_email

For authentication reconfirmation emails, create a theme file in mails/authentication/[authentication_type_plural_name]/reconfirm.plate. This email is sent when an email address is changed.

In the email you can use the following additional variable:

  • confirmation_url

Example:

Hi {{ user.name }}, Your email was changed to {{ user.email}}, on {{ site.name }} ({{ site.domain }}). Please confirm: {{ confirmation_url }}
Custom Email Subject

It is possible to create a custom subject through a separate theme file. The theme file needs to be named after the specific email type. Create the theme file in:

mails/authentication/[authentication_type_plural_name]/reconfirm_subject.plate

Using this custom subject will override the default subject for reconfirm email type. It is not possible to use newlines in your subject. These will automatically be converted to with spaces.

 

password_reset_email

For authentication reconfirmation emails, create a theme file in mails/authentication/[authentication_type_plural_name]/reset_password.plate. This email is sent when a password reset was requested.

In the email you can use the following additional variable:

  • reset_url

Example:

Hi {{ user.name }}, A change in your password was requested on {{ site.name }} ({{ site.domain }}). Change password: {{ reset_url }}
Custom Email Subject

It is possible to create a custom subject through a separate theme file. The theme file needs to be named after the specific email type. Create the theme file in:

mails/authentication/[authentication_type_plural_name]/reset_password_subject.plate

Using this custom subject will override the default subject for reset email type. It is not possible to use newlines in your subject. These will automatically be converted to with spaces.

 

invite_email

For authentication reconfirmation emails, create a theme file in mails/authentication/[authentication_type_plural_name]/invite.plate. This email is sent when somebody is invited to register.

In the email you can use the following additional variable:

  • invite_url

Example:

Custom Email Subject

It is possible to create a custom subject through a separate theme file. The theme file needs to be named after the specific email type. Create the theme file in:

mails/authentication/[authentication_type_plural_name]/invite_subject.plate

Using this custom subject will override the default subject for inviteemail type. It is not possible to use newlines in your subject. These will automatically be converted to with spaces.