From 37ac10c20f8ea067cff515719e4d50e7db511f15 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sun, 9 Feb 2020 02:51:58 +0100 Subject: [PATCH] Try something else for mail newlines --- server/models/User.js | 3 ++- server/routes/users.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/models/User.js b/server/models/User.js index 23b5659a..bd7e8edc 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -134,7 +134,8 @@ const UserModel = notify: function(user, message) { const subject = "vchess.club - notification"; - const body = "Hello " + user.name + "!" + params.lineBreak + message; + const body = "Hello " + user.name + "!" + ` + ` + message; sendEmail(params.mail.noreply, user.email, subject, body); }, diff --git a/server/routes/users.js b/server/routes/users.js index 942f4b8d..e685a57d 100644 --- a/server/routes/users.js +++ b/server/routes/users.js @@ -51,9 +51,11 @@ function setAndSendLoginToken(subject, to, res) if (!!err) return res.json({errmsg: err.toString()}); const body = - "Hello " + to.name + "!" + params.lineBreak + + "Hello " + to.name + "!" + ` + ` + "Access your account here: " + - params.siteURL + "/#/authenticate/" + token + params.lineBreak + + params.siteURL + "/#/authenticate/" + token + ` + ` + "Token will expire in " + params.token.expire/(1000*60) + " minutes." sendEmail(params.mail.noreply, to.email, subject, body, err => { res.json(err || {}); -- 2.44.0