diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/emailer.ts | 5 | ||||
-rw-r--r-- | server/lib/emails/common/base.pug | 25 | ||||
-rw-r--r-- | server/tests/api/server/contact-form.ts | 5 | ||||
-rw-r--r-- | server/tests/api/server/email.ts | 5 |
4 files changed, 27 insertions, 13 deletions
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 6532fb4b4..708808cf2 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts | |||
@@ -606,7 +606,10 @@ class Emailer { | |||
606 | locals: { | 606 | locals: { |
607 | fromName, | 607 | fromName, |
608 | fromEmail, | 608 | fromEmail, |
609 | body | 609 | body, |
610 | |||
611 | // There are not notification preferences for the contact form | ||
612 | hideNotificationPreferences: true | ||
610 | } | 613 | } |
611 | } | 614 | } |
612 | 615 | ||
diff --git a/server/lib/emails/common/base.pug b/server/lib/emails/common/base.pug index b66a2a6d7..991cd5fbe 100644 --- a/server/lib/emails/common/base.pug +++ b/server/lib/emails/common/base.pug | |||
@@ -199,7 +199,7 @@ body(width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: | |||
199 | td(width="40px") | 199 | td(width="40px") |
200 | img(src=`${WEBSERVER.URL}/client/assets/images/icons/icon-192x192.png` width="auto" height="30px" alt="" border="0" style="height: 30px; background: #ffffff; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555;") | 200 | img(src=`${WEBSERVER.URL}/client/assets/images/icons/icon-192x192.png` width="auto" height="30px" alt="" border="0" style="height: 30px; background: #ffffff; font-family: sans-serif; font-size: 15px; line-height: 15px; color: #555555;") |
201 | td | 201 | td |
202 | h1(style='margin: 10px 0 10px 0; font-family: sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;') | 202 | h1(style='margin: 10px 0 10px 0; font-family: sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;') |
203 | block title | 203 | block title |
204 | if title | 204 | if title |
205 | | #{title} | 205 | | #{title} |
@@ -234,17 +234,18 @@ body(width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: | |||
234 | //- 1 Column Text : END | 234 | //- 1 Column Text : END |
235 | //- Email Body : END | 235 | //- Email Body : END |
236 | //- Email Footer : BEGIN | 236 | //- Email Footer : BEGIN |
237 | table(align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%' style='margin: auto;') | 237 | unless hideNotificationPreferences |
238 | tr | 238 | table(align='center' role='presentation' cellspacing='0' cellpadding='0' border='0' width='100%' style='margin: auto;') |
239 | td(style='padding: 20px; padding-bottom: 0px; font-family: sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;') | 239 | tr |
240 | webversion | 240 | td(style='padding: 20px; padding-bottom: 0px; font-family: sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;') |
241 | a.nocolor(href=`${WEBSERVER.URL}/my-account/notifications` style='color: #cccccc; font-weight: bold;') View in your notifications | 241 | webversion |
242 | br | 242 | a.nocolor(href=`${WEBSERVER.URL}/my-account/notifications` style='color: #cccccc; font-weight: bold;') View in your notifications |
243 | tr | 243 | br |
244 | td(style='padding: 20px; padding-top: 10px; font-family: sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;') | 244 | tr |
245 | unsubscribe | 245 | td(style='padding: 20px; padding-top: 10px; font-family: sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;') |
246 | a.nocolor(href=`${WEBSERVER.URL}/my-account/settings#notifications` style='color: #888888;') Manage your notification preferences in your profile | 246 | unsubscribe |
247 | br | 247 | a.nocolor(href=`${WEBSERVER.URL}/my-account/settings#notifications` style='color: #888888;') Manage your notification preferences in your profile |
248 | br | ||
248 | //- Email Footer : END | 249 | //- Email Footer : END |
249 | //if mso | 250 | //if mso |
250 | //- Full Bleed Background Section : BEGIN | 251 | //- Full Bleed Background Section : BEGIN |
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts index 8d1270358..c0965d9d1 100644 --- a/server/tests/api/server/contact-form.ts +++ b/server/tests/api/server/contact-form.ts | |||
@@ -83,6 +83,11 @@ describe('Test contact form', function () { | |||
83 | }) | 83 | }) |
84 | }) | 84 | }) |
85 | 85 | ||
86 | it('Should not have the manage preferences link in the email', async function () { | ||
87 | const email = emails[0] | ||
88 | expect(email['text']).to.not.contain('Manage your notification preferences') | ||
89 | }) | ||
90 | |||
86 | after(async function () { | 91 | after(async function () { |
87 | MockSmtpServer.Instance.kill() | 92 | MockSmtpServer.Instance.kill() |
88 | 93 | ||
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts index 05c89d2a3..53f96a94f 100644 --- a/server/tests/api/server/email.ts +++ b/server/tests/api/server/email.ts | |||
@@ -279,6 +279,11 @@ describe('Test emails', function () { | |||
279 | expect(email['subject']).contains(' unblacklisted') | 279 | expect(email['subject']).contains(' unblacklisted') |
280 | expect(email['text']).contains('my super user video') | 280 | expect(email['text']).contains('my super user video') |
281 | }) | 281 | }) |
282 | |||
283 | it('Should have the manage preferences link in the email', async function () { | ||
284 | const email = emails[6] | ||
285 | expect(email['text']).to.contain('Manage your notification preferences') | ||
286 | }) | ||
282 | }) | 287 | }) |
283 | 288 | ||
284 | describe('When verifying a user email', function () { | 289 | describe('When verifying a user email', function () { |