From 0862add58b5b1f8e36ba265e437005da6af1e866 Mon Sep 17 00:00:00 2001
From: Sebastian Mihalache <sebastian.mihalache@gmail.con>
Date: Wed, 12 Sep 2018 14:20:15 +0300
Subject: [PATCH] feat(component-email): finalise update

---
 .../src/routes/emails/emailCopy.js            | 18 +++-
 .../src/routes/emails/helpers.js              | 43 ++++++++++
 .../src/routes/emails/notifications.js        | 44 ++--------
 .../src/services/email/Email.js               | 18 ++--
 .../emails/emailCopy.js                       | 18 +++-
 .../collectionsInvitations/emails/helpers.js  | 81 ++++++++++++++++++
 .../emails/notifications.js                   | 82 ++-----------------
 .../fragments/notifications/emailCopy.js      | 39 +++++----
 .../fragments/notifications/notifications.js  | 44 +++++-----
 .../notifications/emailCopy.js                |  2 +-
 .../notifications/notifications.js            |  6 +-
 .../notifications/emailCopy.js                | 14 +++-
 .../notifications/notifications.js            | 26 ++++--
 packages/xpub-faraday/config/default.js       |  1 -
 14 files changed, 260 insertions(+), 176 deletions(-)
 create mode 100644 packages/component-email/src/routes/emails/helpers.js
 create mode 100644 packages/component-invite/src/routes/collectionsInvitations/emails/helpers.js

diff --git a/packages/component-email/src/routes/emails/emailCopy.js b/packages/component-email/src/routes/emails/emailCopy.js
index 18b8ee7cc..d14178be9 100644
--- a/packages/component-email/src/routes/emails/emailCopy.js
+++ b/packages/component-email/src/routes/emails/emailCopy.js
@@ -1,17 +1,29 @@
+const config = require('config')
+
+const journalName = config.get('journal.name')
 const getEmailCopy = ({ emailType, role }) => {
   let paragraph
+  const hasIntro = true
+  const hasSignature = true
   switch (emailType) {
     case 'user-signup':
-      paragraph = `Welcome to Hindawi. Please confirm your account by clicking on the link below.`
+      paragraph = `Thank you for creating an account on Hindawi’s review system.
+        To submit a manuscript and access your dashboard, please confirm your account by clicking on the link below.`
       break
     case 'user-added-by-admin':
-      paragraph = `You have been invited to join Hindawi as a ${role}. Please confirm your account and set your account details by clicking on the link below.`
+      paragraph = `You have been invited to join Hindawi as a ${role}.
+        Please confirm your account and set your account details by clicking on the link below.`
+      break
+    case 'he-added-by-admin':
+      paragraph = `You have been invited to become an Academic Editor for the journal ${journalName}.
+        To begin performing your editorial duties, you will need to create an account on Hindawi’s review system.<br/><br/>
+        Please confirm your account details by clicking on the link below.`
       break
     default:
       throw new Error(`The ${emailType} email type is not defined.`)
   }
 
-  return { paragraph, hasLink: true }
+  return { paragraph, hasLink: true, hasIntro, hasSignature }
 }
 
 module.exports = {
diff --git a/packages/component-email/src/routes/emails/helpers.js b/packages/component-email/src/routes/emails/helpers.js
new file mode 100644
index 000000000..6fcbd541b
--- /dev/null
+++ b/packages/component-email/src/routes/emails/helpers.js
@@ -0,0 +1,43 @@
+const config = require('config')
+const { services } = require('pubsweet-component-helper-service')
+
+const { getEmailCopy } = require('./emailCopy')
+
+const confirmSignUp = config.get('confirm-signup.url')
+
+module.exports = {
+  sendNewUserEmail: ({ email, role }) => {
+    email.content.subject = 'Confirm your account'
+
+    let emailType
+    if (role === 'Handling Editor') {
+      emailType = 'he-added-by-admin'
+    } else {
+      emailType = 'user-added-by-admin'
+    }
+
+    const { html, text } = email.getBody({
+      body: getEmailCopy({
+        role,
+        emailType,
+      }),
+    })
+
+    email.sendEmail({ html, text })
+  },
+  sendSignupEmail: ({ email, baseUrl, user }) => {
+    email.content.subject = 'Confirm your email address'
+    email.content.ctaLink = services.createUrl(baseUrl, confirmSignUp, {
+      userId: user.id,
+      confirmationToken: user.confirmationToken,
+    })
+
+    const { html, text } = email.getBody({
+      body: getEmailCopy({
+        emailType: 'user-signup',
+      }),
+    })
+
+    email.sendEmail({ html, text })
+  },
+}
diff --git a/packages/component-email/src/routes/emails/notifications.js b/packages/component-email/src/routes/emails/notifications.js
index 1a89afff1..98db2ecda 100644
--- a/packages/component-email/src/routes/emails/notifications.js
+++ b/packages/component-email/src/routes/emails/notifications.js
@@ -2,17 +2,13 @@ const config = require('config')
 
 const unsubscribeSlug = config.get('unsubscribe.url')
 const resetPath = config.get('invite-reset-password.url')
-const confirmSignUp = config.get('confirm-signup.url')
 
-const { Email, User, services } = require('pubsweet-component-helper-service')
+const { Email, services } = require('pubsweet-component-helper-service')
 
-const { getEmailCopy } = require('./emailCopy')
+const { helpers } = require('./helpers')
 
 module.exports = {
   async sendNotifications({ user, baseUrl, role, UserModel }) {
-    const userHelper = new User({ UserModel })
-    const eicName = await userHelper.getEiCName()
-
     const email = new Email({
       type: 'user',
       toUser: {
@@ -29,7 +25,7 @@ module.exports = {
           title: user.title,
         }),
         ctaText: 'CONFIRM ACCOUNT',
-        signatureName: eicName,
+        signatureName: 'Hindawi',
         unsubscribeLink: services.createUrl(baseUrl, unsubscribeSlug, {
           id: user.id,
         }),
@@ -37,39 +33,9 @@ module.exports = {
     })
 
     if (role) {
-      sendNewUserEmail({ email, role })
+      helpers.sendNewUserEmail({ email, role })
     } else {
-      sendSignupEmail({ email, baseUrl, user })
+      helpers.sendSignupEmail({ email, baseUrl, user })
     }
   },
 }
-
-const sendNewUserEmail = ({ email, role }) => {
-  email.content.subject = 'Confirm Your Account'
-
-  const { html, text } = email.getBody({
-    body: getEmailCopy({
-      emailType: 'user-added-by-admin',
-      role,
-    }),
-  })
-
-  email.sendEmail({ html, text })
-}
-
-const sendSignupEmail = ({ email, baseUrl, user }) => {
-  email.content.subject = 'Confirm Your Email Address'
-  email.content.ctaLink = services.createUrl(baseUrl, confirmSignUp, {
-    userId: user.id,
-    confirmationToken: user.confirmationToken,
-  })
-  email.content.ctaText = 'CONFIRM'
-
-  const { html, text } = email.getBody({
-    body: getEmailCopy({
-      emailType: 'user-signup',
-    }),
-  })
-
-  email.sendEmail({ html, text })
-}
diff --git a/packages/component-helper-service/src/services/email/Email.js b/packages/component-helper-service/src/services/email/Email.js
index df63bb5c4..037773fdf 100644
--- a/packages/component-helper-service/src/services/email/Email.js
+++ b/packages/component-helper-service/src/services/email/Email.js
@@ -1,11 +1,14 @@
 const config = require('config')
+
 const helpers = require('./helpers')
 const SendEmail = require('@pubsweet/component-send-email')
 const logger = require('@pubsweet/logger')
 
+const mainFromEmail = config.get('mailer.from')
 class Email {
   constructor({
     type = 'system',
+    fromEmail = mainFromEmail,
     toUser = {
       id: '',
       email: '',
@@ -23,6 +26,7 @@ class Email {
     this.type = type
     this.toUser = toUser
     this.content = content
+    this.fromEmail = fromEmail
   }
 
   set _toUser(newToUser) {
@@ -66,19 +70,19 @@ class Email {
   }
 
   sendEmail({ text, html }) {
-    const fromEmail = config.get('mailer.from')
+    const { fromEmail: from } = this
+    const { email: to } = this.toUser
+    const { subject } = this.content
     const mailData = {
-      from: fromEmail,
-      to: this.toUser.email,
-      subject: this.content.subject,
+      to,
       text,
       html,
+      from,
+      subject,
     }
 
     logger.info(
-      `EMAIL: Sent email from ${fromEmail} to ${
-        this.toUser.email
-      } with subject '${this.content.subject}'`,
+      `EMAIL: Sent email from ${from} to ${to} with subject '${subject}'`,
     )
     SendEmail.send(mailData)
   }
diff --git a/packages/component-invite/src/routes/collectionsInvitations/emails/emailCopy.js b/packages/component-invite/src/routes/collectionsInvitations/emails/emailCopy.js
index 58d6e89b3..2694ba4c5 100644
--- a/packages/component-invite/src/routes/collectionsInvitations/emails/emailCopy.js
+++ b/packages/component-invite/src/routes/collectionsInvitations/emails/emailCopy.js
@@ -1,9 +1,18 @@
+const config = require('config')
+
+const staffEmail = config.get('journal.staffEmail')
+
 const getEmailCopy = ({ emailType, titleText, targetUserName, comments }) => {
   let paragraph
   let hasLink = true
+  let hasIntro = true
+  let hasSignature = true
   switch (emailType) {
     case 'he-assigned':
-      paragraph = `You have been assigned as a Handling Editor to ${titleText}. Please click on the link below to access the manuscript and make a decision.`
+      hasIntro = false
+      hasSignature = false
+      paragraph = `${targetUserName} has invited you to serve as the Handling Editor for ${titleText}.<br/><br/>
+        To review this manuscript and respond to the invitation, please visit the manuscript details page.`
       break
     case 'he-accepted':
       paragraph = `Dr. ${targetUserName} agreed to be a Handling Editor on ${titleText}. Please click on the link below to access the manuscript.`
@@ -14,14 +23,17 @@ const getEmailCopy = ({ emailType, titleText, targetUserName, comments }) => {
       hasLink = false
       break
     case 'he-revoked':
-      paragraph = `Your Handling Editor assignment to ${titleText} has been revoked.`
+      hasIntro = false
       hasLink = false
+      hasSignature = false
+      paragraph = `${targetUserName} has removed you from the role of Handling Editor for ${titleText}.<br/><br/>
+        The manuscript will no longer appear in your dashboard. Please contact ${staffEmail} if you have any questions about this change.`
       break
     default:
       throw new Error(`The ${emailType} email type is not defined.`)
   }
 
-  return { paragraph, hasLink }
+  return { paragraph, hasLink, hasIntro, hasSignature }
 }
 
 module.exports = {
diff --git a/packages/component-invite/src/routes/collectionsInvitations/emails/helpers.js b/packages/component-invite/src/routes/collectionsInvitations/emails/helpers.js
new file mode 100644
index 000000000..7b788cf69
--- /dev/null
+++ b/packages/component-invite/src/routes/collectionsInvitations/emails/helpers.js
@@ -0,0 +1,81 @@
+const config = require('config')
+const { services } = require('pubsweet-component-helper-service')
+
+const { getEmailCopy } = require('./emailCopy')
+
+const unsubscribeSlug = config.get('unsubscribe.url')
+
+module.exports = {
+  sendInvitedHEEmail: ({
+    email,
+    eicName,
+    baseUrl,
+    customId,
+    titleText,
+    isCanceled,
+    handlingEditor,
+  }) => {
+    email.toUser = {
+      email: handlingEditor.email,
+    }
+
+    email.content.subject = isCanceled
+      ? `${customId}: Editor invitation cancelled`
+      : `${customId}: Invitation to edit a manuscript`
+
+    email.content.unsubscribeLink = services.createUrl(
+      baseUrl,
+      unsubscribeSlug,
+      {
+        id: handlingEditor.id,
+      },
+    )
+
+    const { html, text } = email.getBody({
+      body: getEmailCopy({
+        titleText,
+        targetUserName: eicName,
+        emailType: isCanceled ? 'he-revoked' : 'he-assigned',
+      }),
+    })
+
+    email.sendEmail({ html, text })
+  },
+  sendEiCEmail: async ({
+    eic,
+    email,
+    baseUrl,
+    comments,
+    titleText,
+    isAccepted,
+    targetUserName,
+    subjectBaseText,
+  }) => {
+    email.content.subject = `${subjectBaseText} Assignment Response`
+    const emailType = isAccepted ? 'he-accepted' : 'he-declined'
+
+    email.toUser = {
+      email: eic.email,
+      name: `${eic.firstName} ${eic.lastName}`,
+    }
+
+    email.content.unsubscribeLink = services.createUrl(
+      baseUrl,
+      unsubscribeSlug,
+      {
+        id: eic.id,
+      },
+    )
+
+    const { html, text } = email.getBody({
+      body: getEmailCopy({
+        comments,
+        emailType,
+        titleText,
+        targetUserName,
+      }),
+    })
+
+    email.sendEmail({ html, text })
+  },
+}
diff --git a/packages/component-invite/src/routes/collectionsInvitations/emails/notifications.js b/packages/component-invite/src/routes/collectionsInvitations/emails/notifications.js
index 90df1a7ce..3d19bde22 100644
--- a/packages/component-invite/src/routes/collectionsInvitations/emails/notifications.js
+++ b/packages/component-invite/src/routes/collectionsInvitations/emails/notifications.js
@@ -1,8 +1,5 @@
-const config = require('config')
 const { last } = require('lodash')
 
-const unsubscribeSlug = config.get('unsubscribe.url')
-
 const {
   User,
   Email,
@@ -10,7 +7,7 @@ const {
   Fragment,
 } = require('pubsweet-component-helper-service')
 
-const { getEmailCopy } = require('./emailCopy')
+const { helpers } = require('./helpers')
 
 module.exports = {
   async sendNotifications({
@@ -39,7 +36,8 @@ module.exports = {
     const eics = await userHelper.getEditorsInChief()
     const eic = eics[0]
     const eicName = `${eic.firstName} ${eic.lastName}`
-    const subjectBaseText = `${collection.customId}: Manuscript `
+    const { customId } = collection
+    const subjectBaseText = `${customId}: Manuscript`
 
     const email = new Email({
       type: 'user',
@@ -54,17 +52,17 @@ module.exports = {
     })
 
     if (isEiC) {
-      sendInvitedHEEmail({
+      helpers.sendInvitedHEEmail({
         email,
         baseUrl,
         eicName,
-        isCanceled,
+        customId,
         titleText,
-        subjectBaseText,
+        isCanceled,
         handlingEditor: invitedHE,
       })
     } else {
-      sendEiCEmail({
+      helpers.sendEiCEmail({
         eic,
         email,
         baseUrl,
@@ -77,69 +75,3 @@ module.exports = {
     }
   },
 }
-
-const sendInvitedHEEmail = ({
-  email,
-  eicName,
-  baseUrl,
-  titleText,
-  isCanceled,
-  handlingEditor,
-  subjectBaseText,
-}) => {
-  email.toUser = {
-    email: handlingEditor.email,
-    name: `${handlingEditor.firstName} ${handlingEditor.lastName}`,
-  }
-
-  email.content.subject = isCanceled
-    ? `${subjectBaseText} Assignment Revoked`
-    : `${subjectBaseText} Assignment`
-  email.content.unsubscribeLink = services.createUrl(baseUrl, unsubscribeSlug, {
-    id: handlingEditor.id,
-  })
-  email.content.signatureName = eicName
-
-  const { html, text } = email.getBody({
-    body: getEmailCopy({
-      emailType: isCanceled ? 'he-revoked' : 'he-assigned',
-      titleText,
-    }),
-  })
-
-  email.sendEmail({ html, text })
-}
-
-const sendEiCEmail = async ({
-  eic,
-  email,
-  baseUrl,
-  comments,
-  titleText,
-  isAccepted,
-  targetUserName,
-  subjectBaseText,
-}) => {
-  email.content.subject = `${subjectBaseText} Assignment Response`
-  const emailType = isAccepted ? 'he-accepted' : 'he-declined'
-
-  email.toUser = {
-    email: eic.email,
-    name: `${eic.firstName} ${eic.lastName}`,
-  }
-
-  email.content.unsubscribeLink = services.createUrl(baseUrl, unsubscribeSlug, {
-    id: eic.id,
-  })
-
-  const { html, text } = email.getBody({
-    body: getEmailCopy({
-      comments,
-      emailType,
-      titleText,
-      targetUserName,
-    }),
-  })
-
-  email.sendEmail({ html, text })
-}
diff --git a/packages/component-manuscript-manager/src/routes/fragments/notifications/emailCopy.js b/packages/component-manuscript-manager/src/routes/fragments/notifications/emailCopy.js
index 2f438381c..f6c08ecae 100644
--- a/packages/component-manuscript-manager/src/routes/fragments/notifications/emailCopy.js
+++ b/packages/component-manuscript-manager/src/routes/fragments/notifications/emailCopy.js
@@ -1,39 +1,48 @@
+const config = require('config')
+
+const journalName = config.get('journal.name')
+
 const getEmailCopy = ({ emailType, titleText, expectedDate, customId }) => {
   let paragraph
   const hasLink = true
+  const hasIntro = true
+  const hasSignature = true
   switch (emailType) {
     case 'he-new-version-submitted':
-      paragraph = `A new version of ${titleText} has been submitted.
-        Previous reviewers have been automatically invited to review the manuscript again. Please visit the manuscript details page to see the latest version and any other actions you may need to take.`
+      paragraph = `The authors of ${titleText} have submitted a revised version. <br/><br/>
+        To review this new submission and proceed with the review process, please visit the manuscript details page.`
       break
     case 'submitted-reviewers-after-revision':
-      paragraph = `A new version of ${titleText} has been submitted. As you have reviewed the previous version of this manuscript, I would be grateful if you can review this revised version and submit a review report by ${expectedDate}. You can download the PDF of the revised version and submit your new review from the following URL:`
-      break
-    case 'eic-manuscript-submitted':
-      paragraph = `A new manuscript has been submitted. You can view ${titleText} and take further actions by clicking on the following link:`
+      paragraph = `The authors have submitted a new version of ${titleText}, which you reviewed for ${journalName}.<br/><br/>
+        As you reviewed the previous version of this manuscript, I would be grateful if you could review this revision and submit a new report by ${expectedDate}.
+        To download the updated PDF and proceed with the review process, please visit the manuscript details page.<br/><br/>
+        Thank you again for reviewing for ${journalName}.`
       break
+    // case 'eic-manuscript-submitted':
+    //   paragraph = `A new manuscript has been submitted. You can view ${titleText} and take further actions by clicking on the following link:`
+    //   break
     case 'eqs-manuscript-submitted':
       paragraph = `Manuscript ID ${customId} has been submitted and a package has been sent. Please click on the link below to either approve or reject the manuscript:`
       break
     case 'coauthors-manuscript-submitted':
-      paragraph = `${titleText} has been received.<br/>
-        Please verify your details by clicking the link below.<br/>
-        Once confirmed, you will also be able to view the status and progress of the manuscript.<br/>
-        Thank you for submitting your work to Hindawi. <br/>
+      paragraph = `${titleText}<br/>
+        To confirm the submission and view the status of the manuscript, please verify your details by clicking the link below.<br/>
+        Thank you for submitting your work to ${journalName}. <br/>
       `
       break
     case 'submitting-author-manuscript-submitted':
-      paragraph = `Congratulations, ${titleText} has been successfully submitted.<br/>
-        All authors will receive correspondence regarding this manuscript, though only you will be able to make updates.<br/>
-        In order to view the status of the manuscript, please click the link below.<br/>
-        Thank you for submitting your work to Hindawi. <br/>
+      paragraph = `Congratulations, ${titleText} has been successfully submitted to ${journalName}.<br/>
+        We will confirm this submission with all authors of the manuscript, but you will be the primary recipient of communications from the journal.
+        As submitting author, you will be responsible for responding to editorial queries and making updates to the manuscript. <br/>
+        In order to view the status of the manuscript, please visit the manuscript details page.<br/>
+        Thank you for submitting your work to ${journalName}.
       `
       break
     default:
       throw new Error(`The ${emailType} email type is not defined.`)
   }
 
-  return { paragraph, hasLink }
+  return { paragraph, hasLink, hasIntro, hasSignature }
 }
 
 module.exports = {
diff --git a/packages/component-manuscript-manager/src/routes/fragments/notifications/notifications.js b/packages/component-manuscript-manager/src/routes/fragments/notifications/notifications.js
index 00e10fb91..b656b8a0c 100644
--- a/packages/component-manuscript-manager/src/routes/fragments/notifications/notifications.js
+++ b/packages/component-manuscript-manager/src/routes/fragments/notifications/notifications.js
@@ -9,10 +9,11 @@ const {
 } = require('pubsweet-component-helper-service')
 
 const resetPath = config.get('invite-reset-password.url')
+const journalName = config.get('journal.name')
 const { getEmailCopy } = require('./emailCopy')
 
 const unsubscribeSlug = config.get('unsubscribe.url')
-const editorialAssistantEmail = config.get('mailer.editorialAssistant')
+const editorialAssistantEmail = config.get('journal.staffEmail')
 
 module.exports = {
   async sendNotifications({
@@ -35,7 +36,7 @@ module.exports = {
       UserModel,
     })
 
-    const subjectBaseText = `${collection.customId}: Manuscript`
+    const { customId } = collection
     const titleText = `the manuscript titled "${parsedFragment.title}" by ${
       submittingAuthor.firstName
     } ${submittingAuthor.lastName}`
@@ -43,7 +44,7 @@ module.exports = {
     const email = new Email({
       type: 'user',
       content: {
-        signatureName: get(collection, 'handlingEditor.name', 'Hindawi'),
+        signatureName: '',
         ctaLink: services.createUrl(
           baseUrl,
           `/projects/${collection.id}/versions/${fragment.id}/details`,
@@ -59,8 +60,8 @@ module.exports = {
         email,
         eicName,
         baseUrl,
-        titleText,
-        subjectBaseText,
+        customId,
+        title: parsedFragment.title,
         handlingEditor: get(collection, 'handlingEditor', {}),
       })
     }
@@ -69,10 +70,10 @@ module.exports = {
       sendReviewersEmail({
         email,
         baseUrl,
-        titleText,
+        customId,
         UserModel,
         fragmentHelper,
-        subjectBaseText,
+        title: parsedFragment.title,
       })
     }
 
@@ -82,14 +83,12 @@ module.exports = {
         eicName,
         baseUrl,
         collection,
-        subjectBaseText,
       })
       sendAuthorsEmail({
         email,
         baseUrl,
         titleText,
         UserModel,
-        subjectBaseText,
         fragmentId: fragment.id,
         fragmentAuthors: authors,
         collectionId: collection.id,
@@ -100,11 +99,11 @@ module.exports = {
 
 const sendHandlingEditorEmail = ({
   email,
+  title,
   eicName,
   baseUrl,
-  titleText,
+  customId,
   handlingEditor,
-  subjectBaseText,
 }) => {
   const emailType = 'he-new-version-submitted'
 
@@ -116,12 +115,12 @@ const sendHandlingEditorEmail = ({
     id: handlingEditor.id,
   })
   email.content.signatureName = eicName
-  email.content.subject = `${subjectBaseText} Update`
+  email.content.subject = `${customId}: Revision submitted`
 
   const { html, text } = email.getBody({
     body: getEmailCopy({
       emailType,
-      titleText,
+      titleText: `the manuscript titled ${title}`,
     }),
   })
   email.sendEmail({ html, text })
@@ -129,13 +128,13 @@ const sendHandlingEditorEmail = ({
 
 const sendReviewersEmail = async ({
   email,
+  title,
   baseUrl,
-  titleText,
+  customId,
   UserModel,
   fragmentHelper,
-  subjectBaseText,
 }) => {
-  email.content.subject = `${subjectBaseText} Update`
+  email.content.subject = `${customId}: A manuscript you reviewed has been revised`
   const emailType = 'submitted-reviewers-after-revision'
 
   const reviewers = await fragmentHelper.getReviewers({
@@ -146,7 +145,7 @@ const sendReviewersEmail = async ({
   reviewers.forEach(reviewer => {
     email.toUser = {
       email: reviewer.email,
-      name: `${reviewer.firstName} ${reviewer.lastName}`,
+      name: `${reviewer.lastName}`,
     }
 
     email.content.unsubscribeLink = services.createUrl(
@@ -160,7 +159,7 @@ const sendReviewersEmail = async ({
     const { html, text } = email.getBody({
       body: getEmailCopy({
         emailType,
-        titleText,
+        titleText: `the manuscript titled ${title}`,
         expectedDate: services.getExpectedDate({ daysExpected: 14 }),
       }),
     })
@@ -208,6 +207,7 @@ const sendEQSEmail = ({
 
 const sendAuthorsEmail = async ({
   email,
+  title,
   baseUrl,
   customId,
   UserModel,
@@ -216,7 +216,7 @@ const sendAuthorsEmail = async ({
   collectionId,
   fragmentAuthors,
 }) => {
-  email.content.subject = 'Manuscript Sumbmitted'
+  email.content.subject = `Manuscript submitted to ${journalName}`
 
   const userEmailData = await Promise.all(
     fragmentAuthors.map(async author => {
@@ -231,7 +231,9 @@ const sendAuthorsEmail = async ({
             : 'coauthors-manuscript-submitted',
           titleText: author.isSubmitting
             ? titleText
-            : titleText.replace(/^\w/, firstChar => firstChar.toUpperCase()),
+            : `The manuscript titled "${title}" has been submitted to ${journalName} by ${
+                author.firstName
+              } ${author.lastName}`,
         }),
       }
     }),
@@ -240,7 +242,7 @@ const sendAuthorsEmail = async ({
   userEmailData.forEach(author => {
     email.toUser = {
       email: author.email,
-      name: `${author.firstName} ${author.lastName}`,
+      name: `${author.lastName}`,
     }
     email.content.unsubscribeLink = services.createUrl(
       baseUrl,
diff --git a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/emailCopy.js b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/emailCopy.js
index 85ca9f7a4..6023e9458 100644
--- a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/emailCopy.js
+++ b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/emailCopy.js
@@ -107,7 +107,7 @@ const getEmailCopy = ({
       hasIntro = false
       hasSignature = false
       paragraph = `${titleText} has been accepted for publication by ${eicName}. <br/><br/>
-        Please approve QA screening in MTS system, so that manuscript can be published in Hindawi on hindawi.com`
+        Please complete QA screening so that manuscript can be sent to production.`
       break
     default:
       throw new Error(`The ${emailType} email type is not defined.`)
diff --git a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js
index 08b09ddd4..31fae2c98 100644
--- a/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js
+++ b/packages/component-manuscript-manager/src/routes/fragmentsRecommendations/notifications/notifications.js
@@ -12,7 +12,7 @@ const {
 const { getEmailCopy } = require('./emailCopy')
 const helpers = require('./helpers')
 
-const editorialAssistantEmail = config.get('mailer.editorialAssistant')
+const editorialAssistantEmail = config.get('journal.staffEmail')
 const journalName = config.get('journal.name')
 module.exports = {
   async sendNotifications({
@@ -32,7 +32,7 @@ module.exports = {
     const fragmentAuthors = await fragmentHelper.getAuthorData({ UserModel })
 
     const subjectBaseText = `${collection.customId}: Manuscript`
-    const titleText = `the manuscript titled "${parsedFragment.title}" by ${
+    const titleText = `Txhe manuscript titled "${parsedFragment.title}" by ${
       fragmentAuthors.submittingAuthor.firstName
     } ${fragmentAuthors.submittingAuthor.lastName}`
 
@@ -215,7 +215,7 @@ const sendEQAEmail = ({
   switch (collection.status) {
     case 'accepted':
       emailType = 'eqa-manuscript-published'
-      email.content.subject = `${subjectBaseText} Decision`
+      email.content.subject = `${subjectBaseText} decision finalized`
       break
     case 'inQA':
       emailType = 'eqa-manuscript-request-for-approval'
diff --git a/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/emailCopy.js b/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/emailCopy.js
index 0c36acca5..d454047c9 100644
--- a/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/emailCopy.js
+++ b/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/emailCopy.js
@@ -1,9 +1,19 @@
+const config = require('config')
+
+// const staffEmail = config.get('journal.staffEmail')
+const journalName = config.get('journal.name')
+
 const getEmailCopy = ({ emailType, titleText, comments }) => {
   let paragraph
   let hasLink = true
+  let hasIntro = true
+  let hasSignature = true
   switch (emailType) {
     case 'eqs-manuscript-accepted':
-      paragraph = `We are please to inform you that ${titleText} has passed the Hindawi technical check process and is now submitted. Please click the link below to access the manuscript.`
+      hasIntro = false
+      hasSignature = false
+      paragraph = `A new ${titleText} has been submitted to ${journalName}.<br/><br/>
+        To begin the review process, please visit the manuscript details page.`
       break
     case 'he-manuscript-published':
       hasLink = false
@@ -28,7 +38,7 @@ const getEmailCopy = ({ emailType, titleText, comments }) => {
       throw new Error(`The ${emailType} email type is not defined.`)
   }
 
-  return { paragraph, hasLink }
+  return { paragraph, hasLink, hasIntro, hasSignature }
 }
 
 module.exports = {
diff --git a/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/notifications.js b/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/notifications.js
index d130afb15..e58ed24cd 100644
--- a/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/notifications.js
+++ b/packages/component-manuscript-manager/src/routes/technicalChecks/notifications/notifications.js
@@ -34,11 +34,11 @@ module.exports = {
       UserModel,
     })
 
-    const titleText = `the manuscript titled "${parsedFragment.title}" by ${
+    const titleText = `manuscript titled "${parsedFragment.title}" by ${
       submittingAuthor.firstName
     } ${submittingAuthor.lastName}`
     const subjectBaseText = `${collection.customId}: Manuscript`
-
+    const { customId } = collection
     const userHelper = new User({ UserModel })
     const subject = `${subjectBaseText} ${
       agree ? '' : 'Not '
@@ -85,7 +85,14 @@ module.exports = {
         fragmentAuthors: authors,
       })
     } else {
-      sendEditorsEmail({ email, agree, comments, userHelper, titleText })
+      sendEditorsEmail({
+        email,
+        agree,
+        customId,
+        comments,
+        titleText,
+        userHelper,
+      })
     }
   },
 }
@@ -93,10 +100,12 @@ module.exports = {
 const sendEditorsEmail = async ({
   email,
   agree,
-  comments = '',
-  userHelper,
   titleText,
+  customId,
+  userHelper,
+  comments = '',
 }) => {
+  email.content.subject = `${customId}: New manuscript submitted`
   const emailType = agree
     ? 'eqs-manuscript-accepted'
     : 'eqa-manuscript-returned-to-eic'
@@ -116,7 +125,12 @@ const sendEditorsEmail = async ({
       name: `${eic.firstName} ${eic.lastName}`,
     }
     const { html, text } = email.getBody({
-      body: { paragraph: eic.paragraph, hasLink: eic.hasLink },
+      body: {
+        paragraph: eic.paragraph,
+        hasLink: eic.hasLink,
+        hasIntro: eic.hasIntro,
+        hasSignature: eic.hasSignature,
+      },
     })
     email.sendEmail({ html, text })
   })
diff --git a/packages/xpub-faraday/config/default.js b/packages/xpub-faraday/config/default.js
index 5b333bbdf..aae3363c2 100644
--- a/packages/xpub-faraday/config/default.js
+++ b/packages/xpub-faraday/config/default.js
@@ -115,7 +115,6 @@ module.exports = {
   mailer: {
     from: 'hindawi@thinslices.com',
     path: `${__dirname}/mailer`,
-    editorialAssistant: 'hindawi+editorial@thinslices.com',
   },
   SES: {
     accessKey: process.env.AWS_SES_ACCESS_KEY,
-- 
GitLab