From 03fc19281b476f29b315083f373ca1a1fd4487f9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 Jun 2020 09:21:33 +0200 Subject: Fix emails --- scripts/build/server.sh | 1 + server/lib/emailer.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build/server.sh b/scripts/build/server.sh index 2ec83a3e1..b903f8250 100755 --- a/scripts/build/server.sh +++ b/scripts/build/server.sh @@ -7,3 +7,4 @@ rm -rf ./dist npm run tsc cp "./tsconfig.json" "./dist" cp -r "./server/static" "./server/assets" "./dist/server" +cp -r "./server/lib/emails" "./dist/server/lib" diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 935c9e882..04aade83a 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -473,7 +473,7 @@ class Emailer { }, transport: this.transporter, views: { - root: join(root(), 'server', 'lib', 'emails') + root: join(root(), 'dist', 'server', 'lib', 'emails') }, subjectPrefix: CONFIG.EMAIL.SUBJECT.PREFIX }) @@ -498,8 +498,8 @@ class Emailer { }, options // overriden/new variables given for a specific template in the payload ) as SendEmailOptions) - .then(logger.info) - .catch(logger.error) + .then(res => logger.debug('Sent email.', { res })) + .catch(err => logger.error('Error in email sender.', { err })) } } -- cgit v1.2.3