From 8ba23c858b0b80a96f5a4e27ddcad4d8ad096905 Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Mon, 5 Oct 2020 14:46:08 +0200
Subject: [PATCH] Fix issues in email change emails

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 lib/web/templates/email/email_changed_new.html.eex | 2 +-
 lib/web/templates/email/email_changed_old.html.eex | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/web/templates/email/email_changed_new.html.eex b/lib/web/templates/email/email_changed_new.html.eex
index 374d25f14..f3eb0267b 100644
--- a/lib/web/templates/email/email_changed_new.html.eex
+++ b/lib/web/templates/email/email_changed_new.html.eex
@@ -35,7 +35,7 @@
       <tr>
         <td bgcolor="#ffffff" align="left" style="padding: 20px 30px 0px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
           <p style="margin: 0;">
-            <%= gettext "Hi there! It seems like you wanted to change the email address linked to your account on <b>%{instance}</b>. If you still wish to do so, please click the button below to confirm the change. You will then be able to log in to %{instance} with this new email address.", %{instance: @instance_name} %>
+            <%= gettext("Hi there! It seems like you wanted to change the email address linked to your account on <b>%{instance}</b>. If you still wish to do so, please click the button below to confirm the change. You will then be able to log in to %{instance} with this new email address.", %{instance: @instance_name}) |> raw %>
           </p>
         </td>
       </tr>
diff --git a/lib/web/templates/email/email_changed_old.html.eex b/lib/web/templates/email/email_changed_old.html.eex
index 0d45d28eb..a4c2acd0c 100644
--- a/lib/web/templates/email/email_changed_old.html.eex
+++ b/lib/web/templates/email/email_changed_old.html.eex
@@ -59,6 +59,13 @@
           </table>
         </td>
       </tr>
+      <tr>
+        <td bgcolor="#ffffff" align="left" style="padding: 20px 30px 0px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;" >
+          <p>
+            <%= gettext("If you did not trigger this change yourself, it is likely that someone has gained access to your %{host} account. Please log in and change your password immediately. If you cannot login, contact the admin on %{host}.", host: @instance[:name]) %>
+          </p>
+        </td>
+      </tr>
     </table>
     <!--[if (gte mso 9)|(IE)]>
     </td>