diff --git a/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js b/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js
deleted file mode 100644
index 01d1bed090..0000000000
--- a/services/web/app/src/Features/Email/Bodies/SingleCTAEmailBody.js
+++ /dev/null
@@ -1,59 +0,0 @@
-const _ = require('underscore')
-
-module.exports = _.template(`\
-
-
- <% if (title) { %>
-
- <%= title %>
-
- <% } %>
-
- <% if (greeting) { %>
-
- <%= greeting %>
-
- <% } %>
-
- <%= message %>
-
-
-
-
-
- <% if (secondaryMessage) { %>
-
-
- <%= secondaryMessage %>
-
- <% } %>
-
-
- If the button above does not appear, please copy and paste this link into your browser's address bar:
- <%= ctaURL %>
-
- |
- |
---|
|
-
-<% if (gmailGoToAction) { %>
-
-<% } %>\
-`)
diff --git a/services/web/app/src/Features/Email/EmailBuilder.js b/services/web/app/src/Features/Email/EmailBuilder.js
index d6f40a0f1d..7816eb91a8 100644
--- a/services/web/app/src/Features/Email/EmailBuilder.js
+++ b/services/web/app/src/Features/Email/EmailBuilder.js
@@ -1,13 +1,11 @@
const _ = require('underscore')
const settings = require('settings-sharelatex')
-const marked = require('marked')
const moment = require('moment')
const EmailMessageHelper = require('./EmailMessageHelper')
const StringHelper = require('../Helpers/StringHelper')
const BaseWithHeaderEmailLayout = require(`./Layouts/BaseWithHeaderEmailLayout`)
const SpamSafe = require('./SpamSafe')
const ctaEmailBody = require('./Bodies/cta-email')
-const SingleCTAEmailBody = require(`./Bodies/SingleCTAEmailBody`)
const NoCTAEmailBody = require(`./Bodies/NoCTAEmailBody`)
function _emailBodyPlainText(content, opts, ctaEmail) {
@@ -78,58 +76,6 @@ function ctaTemplate(content) {
}
}
-//
-// DEPRECATED
-//
-// Use ctaTemplate instead of CTAEmailTemplate
-//
-function CTAEmailTemplate(content) {
- if (content.greeting == null) {
- content.greeting = () => 'Hi,'
- }
- if (content.secondaryMessage == null) {
- content.secondaryMessage = () => ''
- }
- return {
- subject(opts) {
- return content.subject(opts)
- },
- layout: BaseWithHeaderEmailLayout,
- plainTextTemplate(opts) {
- return `\
-${content.greeting(opts)}
-
-${content.message(opts).trim()}
-
-${content.ctaText(opts)}: ${content.ctaURL(opts)}
-
-${(typeof content.secondaryMessage === 'function'
- ? content.secondaryMessage(opts).trim()
- : undefined) || ''}
-
-Regards,
-The ${settings.appName} Team - ${settings.siteUrl}\
-`
- },
- compiledTemplate(opts) {
- return SingleCTAEmailBody({
- title:
- typeof content.title === 'function' ? content.title(opts) : undefined,
- greeting: content.greeting(opts),
- message: marked(content.message(opts).trim()),
- secondaryMessage: marked(content.secondaryMessage(opts).trim()),
- ctaText: content.ctaText(opts),
- ctaURL: content.ctaURL(opts),
- gmailGoToAction:
- typeof content.gmailGoToAction === 'function'
- ? content.gmailGoToAction(opts)
- : undefined,
- StringHelper
- })
- }
- }
-}
-
function NoCTAEmailTemplate(content) {
if (content.greeting == null) {
content.greeting = () => 'Hi,'
@@ -558,7 +504,6 @@ function _formatUserNameAndEmail(user, placeholder) {
module.exports = {
templates,
ctaTemplate,
- CTAEmailTemplate,
NoCTAEmailTemplate,
buildEmail
}