-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed up the UI of the verification email
- Loading branch information
Showing
1 changed file
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,34 @@ const transporter = nodemailer.createTransport({ | |
// Function to send email with the verification link | ||
const sendEmail = (toEmail: string, verificationLink: string) => { | ||
const mailOptions = { | ||
from: 'your-email@gmail.com', | ||
from: 'lifescape9@gmail.com', | ||
to: toEmail, | ||
subject: 'Verify your email for LifeScape', | ||
text: `Please verify your email by clicking the following link: ${verificationLink}`, | ||
html: `<p>Please verify your email by clicking <a href="${verificationLink}">here</a>.</p>`, | ||
html: ` | ||
<div style="font-family: Arial, sans-serif; color: #333; max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #e1e1e1; border-radius: 10px;"> | ||
<h2 style="text-align: center; color: #4CAF50;">Verify your email for LifeScape</h2> | ||
<p style="font-size: 16px; line-height: 1.5;">Hi there,</p> | ||
<p style="font-size: 16px; line-height: 1.5;"> | ||
Thank you for signing up for LifeScape! To complete your registration, please verify your email address by clicking the button below. | ||
</p> | ||
<div style="text-align: center; margin: 30px 0;"> | ||
<a href="${verificationLink}" | ||
style="background-color: #4CAF50; color: white; padding: 10px 20px; text-decoration: none; font-size: 16px; border-radius: 5px;"> | ||
Verify Email | ||
</a> | ||
</div> | ||
<p style="font-size: 14px; line-height: 1.5;"> | ||
If you didn't request this email, you can safely ignore this message. | ||
</p> | ||
<p style="font-size: 14px; color: #888;">Cheers, <br> The LifeScape Team</p> | ||
<hr style="border: none; border-top: 1px solid #e1e1e1; margin: 20px 0;"> | ||
<p style="font-size: 12px; color: #999; text-align: center;"> | ||
You are receiving this email because you registered with LifeScape. | ||
<br> | ||
If you have any questions, contact us at <a href="mailto:[email protected]" style="color: #4CAF50; text-decoration: none;">[email protected]</a>. | ||
</p> | ||
</div> | ||
`, | ||
}; | ||
|
||
transporter.sendMail(mailOptions, (error, info) => { | ||
|
@@ -35,6 +58,7 @@ const sendEmail = (toEmail: string, verificationLink: string) => { | |
}); | ||
}; | ||
|
||
|
||
/** @api {post} /users/register Register User | ||
* @apiName RegisterUser | ||
* @apiGroup User | ||
|