Attempt to send correct text email
authorBenjamin Auder <benjamin.auder@somewhere>
Sun, 9 Feb 2020 01:35:00 +0000 (02:35 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sun, 9 Feb 2020 01:35:00 +0000 (02:35 +0100)
server/models/User.js
server/routes/users.js

index ff019bd..23b5659 100644 (file)
@@ -134,7 +134,7 @@ const UserModel =
   notify: function(user, message)
   {
     const subject = "vchess.club - notification";
   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);
   },
 
     sendEmail(params.mail.noreply, user.email, subject, body);
   },
 
index ebc77cc..942f4b8 100644 (file)
@@ -51,9 +51,9 @@ function setAndSendLoginToken(subject, to, res)
     if (!!err)
       return res.json({errmsg: err.toString()});
     const body =
     if (!!err)
       return res.json({errmsg: err.toString()});
     const body =
-      "Hello " + to.name + "!\\n" +
+      "Hello " + to.name + "!" + params.lineBreak +
       "Access your account here: " +
       "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 || {});
       "Token will expire in " + params.token.expire/(1000*60) + " minutes."
     sendEmail(params.mail.noreply, to.email, subject, body, err => {
       res.json(err || {});