From: Benjamin Auder Date: Sun, 9 Feb 2020 01:35:00 +0000 (+0100) Subject: Attempt to send correct text email X-Git-Url: https://git.auder.net/js/css/app_dev.php/parser.js?a=commitdiff_plain;h=fbd20b7ecf2bec69df1d5c09e77acad4d4536874;p=vchess.git Attempt to send correct text email --- diff --git a/server/models/User.js b/server/models/User.js index ff019bdb..23b5659a 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -134,7 +134,7 @@ const UserModel = notify: function(user, message) { const subject = "vchess.club - notification"; - const body = "Hello " + user.name + "!\n" + message; + const body = "Hello " + user.name + "!" + params.lineBreak + message; sendEmail(params.mail.noreply, user.email, subject, body); }, diff --git a/server/routes/users.js b/server/routes/users.js index ebc77cce..942f4b8d 100644 --- a/server/routes/users.js +++ b/server/routes/users.js @@ -51,9 +51,9 @@ function setAndSendLoginToken(subject, to, res) if (!!err) return res.json({errmsg: err.toString()}); const body = - "Hello " + to.name + "!\\n" + + "Hello " + to.name + "!" + params.lineBreak + "Access your account here: " + - params.siteURL + "/#/authenticate/" + token + "\\n" + + params.siteURL + "/#/authenticate/" + token + params.lineBreak + "Token will expire in " + params.token.expire/(1000*60) + " minutes." sendEmail(params.mail.noreply, to.email, subject, body, err => { res.json(err || {});