From e9c16d852efb716021e73917b3876aee689fc266 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 18 Feb 2010 08:56:28 +0000 Subject: [PATCH] add paragraphs to html emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- CHANGELOG.rdoc | 1 + .../devise/mailer/confirmation_instructions.html.erb | 6 +++--- .../devise/mailer/reset_password_instructions.html.erb | 10 +++++----- app/views/devise/mailer/unlock_instructions.html.erb | 8 ++++---- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index 5acca981..93874790 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -6,6 +6,7 @@ * You can specify the controller in routes and have specific controllers for each role. * Devise.orm is deprecated. This reduces the required API to hook your ORM with devise. * Use metal for failure app. + * HTML e-mails now have proper formatting. * deprecations * Rails 3 compatible only. diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index 84665383..a6ea8ca1 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -1,5 +1,5 @@ -Welcome <%= @resource.email %>! +

Welcome <%= @resource.email %>!

-You can confirm your account through the link below: +

You can confirm your account through the link below:

-<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %> +

<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>

diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb index 5587598d..ae9e888a 100644 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -1,8 +1,8 @@ -Hello <%= @resource.email %>! +

Hello <%= @resource.email %>!

-Someone has requested a link to change your password, and you can do this through the link below. +

Someone has requested a link to change your password, and you can do this through the link below.

-<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %> +

<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>

-If you didn't request this, please ignore this email. -Your password won't change until you access the link above and create a new one. +

If you didn't request this, please ignore this email.

+

Your password won't change until you access the link above and create a new one.

diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb index 9bab1904..2263c219 100644 --- a/app/views/devise/mailer/unlock_instructions.html.erb +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -1,7 +1,7 @@ -Hello <%= @resource.email %>! +

Hello <%= @resource.email %>!

-Your account has been locked due to an excessive amount of unsuccessful sign in attempts. +

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

-Click the link below to unlock your account: +

Click the link below to unlock your account:

-<%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %> +

<%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %>