From: Benjamin Auder Date: Sun, 9 Feb 2020 01:51:58 +0000 (+0100) Subject: Try something else for mail newlines X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/user/assets/rpsls.css?a=commitdiff_plain;h=37ac10c20f8ea067cff515719e4d50e7db511f15;p=vchess.git Try something else for mail newlines --- 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 || {});