From fbd20b7ecf2bec69df1d5c09e77acad4d4536874 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sun, 9 Feb 2020 02:35:00 +0100
Subject: [PATCH] Attempt to send correct text email

---
 server/models/User.js  | 2 +-
 server/routes/users.js | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

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 || {});
-- 
2.44.0