Răsfoiți Sursa

Change password reset email to be mostly plaintext.

Lee Morgan 5 ani în urmă
părinte
comite
d711a85018
3 a modificat fișierele cu 5 adăugiri și 13 ștergeri
  1. 1 1
      controllers/passwordReset.js
  2. 3 11
      emails/passwordReset.js
  3. 1 1
      emails/verifyEmail.js

+ 1 - 1
controllers/passwordReset.js

@@ -24,7 +24,7 @@ module.exports = {
                     to: owner.email,
                     subject: "Password Reset",
                     html: passwordReset({
-                        name: owner.email,
+                        name: owner.name,
                         link: `${process.env.SITE}/reset/${owner._id}/${owner.session.sessionId}`
                     })
                 };

+ 3 - 11
emails/passwordReset.js

@@ -1,17 +1,9 @@
 module.exports = (data)=>{
     return `
-    <div id="passwordReset">
-        <header style="width:100%;height:75px;background:rgb(0,27,45);">
-            <img src="https://i.postimg.cc/dQky3vPX/logo.png" alt="Subline Logo" style="height:50px;padding:12px 12px;float:left;">
+        <p>Password Resest for ${data.name}</p>
 
-            <h3 style="color:rgb(255,99,107);font-size:30px;margin:15px 0 0 0;float:left;">THE SUBLINE</h3>
-        </header>
+        <p>Please follow the link below to reset your password:</p>
 
-        <h1 style="text-align:center;">Password Resest for ${data.name}</h1>
-
-        <p>Follow the link below to go to reset your password.</p>
-
-        <p>${data.link}</p>
-    </div>
+        <a href="${data.link}">${data.link}</a>
     `;
 }

+ 1 - 1
emails/verifyEmail.js

@@ -1,7 +1,7 @@
 module.exports = (data)=>{
     return `
         <div id="verifyEmail">
-            <p>This email is to verify the account for ${data.name} on The Subline.</p>
+            <p>This email is to verify the account for "${data.name}" on The Subline.</p>
             
             <p>Please use the following link to verify your email:</p>
             <a href="${data.link}">${data.link}</a>