From d0175808417efd396fb5aef88f6285afca4a77b4 Mon Sep 17 00:00:00 2001
From: Sebastian Mihalache <sebi.mihalache@gmail.com>
Date: Mon, 24 Sep 2018 06:43:15 -0400
Subject: [PATCH] feat(emails): add footer

---
 .../src/services/email/Email.js                  |  8 +++++---
 .../services/email/templates/partials/footer.hbs | 16 ++++++++++------
 .../services/email/templates/partials/header.hbs |  8 +++++---
 3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/packages/component-helper-service/src/services/email/Email.js b/packages/component-helper-service/src/services/email/Email.js
index 5fdd6b42c..5b422bd5a 100644
--- a/packages/component-helper-service/src/services/email/Email.js
+++ b/packages/component-helper-service/src/services/email/Email.js
@@ -46,9 +46,10 @@ class Email {
       return {
         html: helpers.getInvitationBody({
           replacements: {
-            toUserName: this.toUser.name,
-            ...this.content,
             ...body,
+            ...this.content,
+            toEmail: this.toUser.email,
+            toUserName: this.toUser.name,
           },
         }),
         text: `${this.content.signatureName}`,
@@ -59,8 +60,9 @@ class Email {
       html: helpers.getNotificationBody({
         replacements: {
           ...body,
-          toUserName: this.toUser.name,
           ...this.content,
+          toEmail: this.toUser.email,
+          toUserName: this.toUser.name,
         },
       }),
       text: `${body.paragraph} ${this.content.ctaLink} ${
diff --git a/packages/component-helper-service/src/services/email/templates/partials/footer.hbs b/packages/component-helper-service/src/services/email/templates/partials/footer.hbs
index ef8f0564b..5a9811291 100644
--- a/packages/component-helper-service/src/services/email/templates/partials/footer.hbs
+++ b/packages/component-helper-service/src/services/email/templates/partials/footer.hbs
@@ -1,14 +1,18 @@
 <div data-role="module-unsubscribe" class="module unsubscribe-css__unsubscribe___2CDlR" role="module" data-type="unsubscribe"
   style="color:#444444;font-size:12px;line-height:20px;padding:16px 16px 16px 16px;text-align:center">
+  <p style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:20px;text-align:left">
+    This email was sent to {{toEmail}}. You have received this email in regards to the account creation, submission, or peer review process of a paper submitted to a journal published by Hindawi Limited.
+  </p>
   <div class="Unsubscribe--addressLine">
-    <p class="Unsubscribe--senderName" style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:20px">Hindawi Limited</p>
-    <p style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:20px">
-      <span class="Unsubscribe--senderAddress">3rd Floor, Adam House, 1 Fitzroy Square</span>,
-      <span class="Unsubscribe--senderCity">London</span>,
-      <span class="Unsubscribe--senderState">United Kingdom</span>
-      <span class="Unsubscribe--senderZip">W1T 5HF</span>
+    <p style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:20px;text-align:left">
+      Hindawi Limited, 3rd Floor, Adam House, 1 Fitzroy Square, London, W1T 5HF, United Kingdom
     </p>
   </div>
+  <p style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:20px;text-align:left">
+  </p>
+  <p style="font-family:Arial, Helvetica, sans-serif;font-size:11px;line-height:20px;text-align:left">
+    Hindawi respects your right to privacy. Please see our <a href="https://www.hindawi.com/privacy/">privacy policy</a> for information on how we store, process, and safeguard your data.
+  </p>
   <p style="font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:20px">
     <a class="Unsubscribe--unsubscribeLink" href="{{ unsubscribeLink }}">Unsubscribe</a>
   </p>
diff --git a/packages/component-helper-service/src/services/email/templates/partials/header.hbs b/packages/component-helper-service/src/services/email/templates/partials/header.hbs
index a62d4be74..aef79db92 100644
--- a/packages/component-helper-service/src/services/email/templates/partials/header.hbs
+++ b/packages/component-helper-service/src/services/email/templates/partials/header.hbs
@@ -153,9 +153,11 @@
                               <table class="wrapper" role="module" data-type="image" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
                                 <tr>
                                   <td style="font-size:6px;line-height:10px;padding:20px 0px 20px 0px;" valign="top" align="center">
-                                    <img class="max-width" border="0" style="display:block;color:#000000;text-decoration:none;font-family:Helvetica, arial, sans-serif;font-size:16px;max-width:10% !important;width:10%;height:auto !important;"
-                                      src="https://marketing-image-production.s3.amazonaws.com/uploads/bb39b20cf15e52c1c0933676e25f2b2402737c6560b8098c204ad6932b84eb2058804376dbc4db138c7a21dcaed9325bde36185648afac5bc97e3d73d4e12718.png"
-                                      alt="" width="60">
+                                    <a href="https://hindawi.com">
+                                      <img class="max-width" border="0" style="display:block;color:#000000;text-decoration:none;font-family:Helvetica, arial, sans-serif;font-size:16px;max-width:10% !important;width:10%;height:auto !important;"
+                                        src="https://marketing-image-production.s3.amazonaws.com/uploads/bb39b20cf15e52c1c0933676e25f2b2402737c6560b8098c204ad6932b84eb2058804376dbc4db138c7a21dcaed9325bde36185648afac5bc97e3d73d4e12718.png"
+                                        alt="" width="60">
+                                    </a>
                                   </td>
                                 </tr>
                               </table>
\ No newline at end of file
-- 
GitLab