Custom Email Templates

Table of contents

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.

Custom Email Subject

It is possible to create a custom subject for all four types of emails through a separate theme file. Create the theme file in:

mails/authentication/[authentication_type_plural_name]/­[authentication_type_name]_subject.plate

Using this custom subject will override the default subject.

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 variables:

  • site.name

  • site.domain

  • confirmation_url

  • [authentication_type_name], e.g. user

Example:


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

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

Hi {{ user.name }},

Welcome to {{ site.name }} ({{ site.domain }}). 
Your email is {{ user.email }}.
Please confirm: {{ confirmation_url }}.
confirm_email.plate
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
Add redirect_to_url to email.

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 variables:

  • site.name

  • site.domain

  • confirmation_url

  • [authentication_type_name], e.g. user

Example:
Hi {{ user.name }},

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

password_reset_email

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

In the email you can use the following variables:

  • site.name

  • site.domain

  • reset_url

  • [authentication_type_name], e.g. user

Example:
Hi {{ user.name }},

A change in your password was requested on {{ site.name }} ({{ site.domain }}). 
Change password: {{ reset_url }}

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 variables:

  • site.name

  • site.domain

  • invite_url

  • [authentication_type_name], e.g. user

Example:
Hi {{ user.name }},

You were invited as a user to {{ site.name }} ({{ site.domain }}). 
Accept invitation: {{ invite_url }}

Need help?

Do you have any question which is not answered in this knowledge base? Contact us. We are here to help you.