Chevron left

Mailers

Devise

Theme

Themes/hound/logo.svg

Hound

Framework

Tailwind CSS logo

Tailwind CSS

Devise ships with optional views you can generate on command. Most of these should work out of the box with Rails UI. The generated views in app/views/devise/mailer/ have the Hound theme applied. Save time without reinventing the wheel!

When you configured your app Rails UI generated and copied these mailer templates over automatically so there is no need to generate the views.

Configuration

Rails UI takes care of the following:

  1. Installs the latest version of the Devise gem
  2. Copies over custom views and mailer templates based on the active Rails UI Theme (yours is currently: Hound).
  3. Adds a few helpers via a bundled module in the Rails UI engine.

Depending on your application you can enable different features from Devise so we'll leave the rest up to you to configure.

Be sure to update your config/initializers/devise.rb file to suite your needs.

Mailers

Confirmation instructions

  • From:
  • To:
  • Date:
  • Subject:
  • andy@edenpark.com
  • saasquatch@railsui.com
  • December 08, 2025
  • Confirmation instructions
Email preview
 
 

Hi john.doe@example.com,

Thanks for signing up at ACME.xyz! Before you access your new account we want to make sure it's really you.

Confirm your account by clicking the button below.

Confirm my account
 
 
<!-- app/views/devise/mailer/confirmation_instructions.html.erb -->
<p>Hi <%= @email %>,</p>

<p>Thanks for signing up at ACME.xyz! Before you access your new account we want to make sure it's really you.</p>

<p>Confirm your account by clicking the button below.</p>

<%= email_action "Confirm my account", confirmation_url(@resource, confirmation_token: @token), fullwidth: true %>
/ app/views/devise/mailer/confirmation_instructions.html.erb
%p
  Hi #{@email},
%p Thanks for signing up at ACME.xyz! Before you access your new account we want to make sure it's really you.
%p Confirm your account by clicking the button below.
= email_action "Confirm my account", confirmation_url(@resource, confirmation_token: @token), fullwidth: true

Mailers

Email changed

  • From:
  • To:
  • Date:
  • Subject:
  • andy@edenpark.com
  • saasquatch@railsui.com
  • December 08, 2025
  • Email changed
Email preview
 
 

Hi john.doe@example.com,

We're contacting you to notify you that your email has been changed to saasquatch@railsui.com.

View account
 
 
<!-- app/views/devise/mailer/email_changed.html.erb -->
<p>Hi <%= @email %>,</p>

<% if @resource.try(:unconfirmed_email?) %>
  <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
<% else %>
  <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
<% end %>
/ app/views/devise/mailer/email_changed.haml.erb
%p
  Hi #{@email},
- if @resource.try(:unconfirmed_email?)
  %p
    We're contacting you to notify you that your email is being changed to #{@resource.unconfirmed_email}.
- else
  %p
    We're contacting you to notify you that your email has been changed to #{@resource.email}.

Mailers

Password change

  • From:
  • To:
  • Date:
  • Subject:
  • andy@edenpark.com
  • saasquatch@railsui.com
  • December 08, 2025
  • Password changed
Email preview
 
 

Hi john.doe@example.com,

We're contacting you to notify you that your password has been changed.

 
 
<!-- app/views/devise/mailer/password_changed.html.erb -->
<p>Hi <%= @resource.email %>,</p>

<p>We're contacting you to notify you that your password has been changed.</p>
/ app/views/devise/mailer/password_changed.haml.erb
%p
  Hi #{@resource.email},
%p We're contacting you to notify you that your password has been changed.

Mailers

Reset password instructions

  • From:
  • To:
  • Date:
  • Subject:
  • andy@edenpark.com
  • saasquatch@railsui.com
  • December 08, 2025
  • Reset password instructions
Email preview
 
 

Hi john.doe@example.com,

We're contacting you to notify you that your password has been changed.

If you didn't make this change we recommend resetting your password immediately or contacting someone from our support team.

 
 
<!-- app/views/devise/mailer/reset_password_instructions.html.erb -->
<p>Hi <%= @resource.email %>,</p>

<p>We're contacting you to notify you that your password has been changed.</p>

<p>If you didn't make this change we recommend <%= link_to "resetting your password immediately", edit_password_url(@resource, reset_password_token: @token) %> or <%= mail_to Railsui.config.support_email, "contacting someone from our support team" %>.</p>
/ app/views/devise/mailer/reset_password_instructions.haml.erb
%p
  Hi #{@resource.email},
%p We're contacting you to notify you that your password has been changed.
%p
  If you didn't make this change we recommend #{link_to "resetting your password immediately", edit_password_url(@resource, reset_password_token: @token)} or #{mail_to "some@email.com", "contacting someone from our support team"}.

Mailers

Unlock instructions

  • From:
  • To:
  • Date:
  • Subject:
  • andy@edenpark.com
  • saasquatch@railsui.com
  • December 08, 2025
  • Unlock instructions
Email preview
 
 

Hi John Doe,

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

Click the button below to unlock your account:

Unlock my account
 
 
<!-- app/views/devise/mailer/unlock_instructions.html.erb -->
<p>Hi <%= @resource.email %>,</p>

<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>

<p>Click the link below to unlock your account:</p>

<%= email_action "Unlock account", unlock_url(@resource, unlock_token: @token), fullwidth: true %>
/ app/views/devise/mailer/unlock_instructions.html.erb
%p
  Hi #{@resource.email},
%p Your account has been locked due to an excessive number of unsuccessful sign in attempts.
%p Click the link below to unlock your account:
= email_action "Unlock account", unlock_url(@resource, unlock_token: @token), fullwidth: true