-
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.
Merge pull request #23 from rajumb0232/dev
refactoring the OTP verification mail and confirmation mail code to use Thymeleaf templates
- Loading branch information
Showing
5 changed files
with
200 additions
and
36 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
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
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
107 changes: 107 additions & 0 deletions
107
E-Stores-API/src/main/resources/templates/otp-verification-request.html
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>Verification OTP</title> | ||
</head> | ||
<body style="margin: 0; padding: 0; background-color: #f7f7f7; font-family: Arial, sans-serif; -webkit-font-smoothing: antialiased;"> | ||
<!-- Main Table --> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #f7f7f7; padding: 20px; min-width: 100%; table-layout: fixed;"> | ||
<tr> | ||
<td align="center" valign="top"> | ||
<!-- Content Table --> | ||
<table border="0" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); max-width: 600px; width: 100%;"> | ||
<!-- Logo/Brand Section --> | ||
<tr> | ||
<td align="center" style="padding: 40px 40px 20px 40px;"> | ||
<h1 style="margin: 0; font-size: 28px; color: #f9a825; font-weight: bold; letter-spacing: -0.5px;"> | ||
E Stores | ||
</h1> | ||
</td> | ||
</tr> | ||
|
||
<!-- Title --> | ||
<tr> | ||
<td align="center" style="padding: 0 40px 30px 40px;"> | ||
<h2 style="margin: 0; font-size: 24px; color: #1e1e1e; font-weight: bold;"> | ||
Verification OTP | ||
</h2> | ||
</td> | ||
</tr> | ||
|
||
<!-- Message --> | ||
<tr> | ||
<td align="center" style="padding: 0 40px 30px 40px;"> | ||
<p style="margin: 0; font-size: 16px; color: #4a4a4a; line-height: 24px;"> | ||
Please use the verification code below to complete your verification | ||
</p> | ||
</td> | ||
</tr> | ||
|
||
<!-- OTP Code --> | ||
<tr> | ||
<td align="center" style="padding: 0 40px 30px 40px;"> | ||
<div style="display: inline-block; padding: 20px 48px; background-color: #fafafa; border: 2px solid #f9a825; border-radius: 8px;"> | ||
<span th:text="${otp}" style="font-size: 36px; color: #f9a825; font-weight: bold; letter-spacing: 4px; font-family: 'Courier New', monospace;"></span> | ||
</div> | ||
</td> | ||
</tr> | ||
|
||
<!-- Note --> | ||
<tr> | ||
<td align="center" style="padding: 0 40px 40px 40px;"> | ||
<p style="margin: 0; font-size: 14px; color: #666666; font-style: italic; line-height: 20px;"> | ||
<span style="font-weight: bold; color: #f9a825;">Note:</span> | ||
This verification code will expire in 5 minutes. | ||
</p> | ||
</td> | ||
</tr> | ||
|
||
<!-- Divider --> | ||
<tr> | ||
<td style="border-top: 1px solid #f0f0f0; margin: 0 40px;"></td> | ||
</tr> | ||
|
||
<!-- Footer --> | ||
<tr> | ||
<td style="padding: 30px 40px;"> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<!-- Signature --> | ||
<tr> | ||
<td style="padding-bottom: 20px;"> | ||
<p style="margin: 0; color: #4a4a4a; font-size: 14px; line-height: 20px;"> | ||
Best regards,<br/> | ||
<strong style="color: #1e1e1e;">E Stores Team</strong> | ||
</p> | ||
</td> | ||
</tr> | ||
<!-- Copyright & Links --> | ||
<tr> | ||
<td style="color: #666666; font-size: 12px; line-height: 1.5;"> | ||
<p style="margin: 0;">© 2024 E Stores. All rights reserved.</p> | ||
<p style="margin: 8px 0 0 0;"> | ||
<span th:if="${unsubscribeLink}"> | ||
<a href="#" style="color: #f9a825; text-decoration: none;">Help & Support</a> | ||
<span style="color: #666666; padding: 0 5px;">|</span> | ||
</span> | ||
<a href="#" style="color: #f9a825; text-decoration: none;">Privacy Policy</a> | ||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<!-- Spacing for email clients --> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;"> | ||
<tr> | ||
<td style="height: 20px;"></td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
74 changes: 74 additions & 0 deletions
74
E-Stores-API/src/main/resources/templates/simple-message.html
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>E Stores</title> | ||
</head> | ||
<body style="margin: 0; padding: 0; background-color: #f7f7f7; font-family: Arial, sans-serif;"> | ||
<!-- Main Table --> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #f7f7f7; padding: 20px;"> | ||
<tr> | ||
<td align="center"> | ||
<!-- Content Table --> | ||
<table border="0" cellpadding="0" cellspacing="0" width="600" style="background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);"> | ||
<!-- Logo/Brand Section --> | ||
<tr> | ||
<td align="center" style="padding: 40px 40px 20px 40px;"> | ||
<h1 style="margin: 0; font-size: 28px; color: #f9a825; font-weight: bold; letter-spacing: -0.5px;"> | ||
E Stores | ||
</h1> | ||
</td> | ||
</tr> | ||
|
||
<!-- Title --> | ||
<tr> | ||
<td align="center" style="padding: 0 40px 30px 40px;"> | ||
<h2 style="margin: 0; font-size: 24px; color: #1e1e1e; font-weight: bold;"> | ||
Registration Successful | ||
</h2> | ||
</td> | ||
</tr> | ||
|
||
<!-- Message Content --> | ||
<tr> | ||
<td align="left" style="padding: 20px 40px;"> | ||
<div th:utext="${message}" style="color: #1e1e1e; font-size: 16px; line-height: 1.6;"></div> | ||
</td> | ||
</tr> | ||
|
||
<!-- Footer --> | ||
<tr> | ||
<td style="padding: 30px 40px;"> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<!-- Signature --> | ||
<tr> | ||
<td style="padding-bottom: 20px;"> | ||
<p style="margin: 0; color: #4a4a4a; font-size: 14px; line-height: 20px;"> | ||
Best regards,<br/> | ||
<strong style="color: #1e1e1e;">E Stores Team</strong> | ||
</p> | ||
</td> | ||
</tr> | ||
<!-- Copyright & Links --> | ||
<tr> | ||
<td style="color: #666666; font-size: 12px; line-height: 1.5;"> | ||
<p style="margin: 0;">© 2024 E Stores. All rights reserved.</p> | ||
<p style="margin: 8px 0 0 0;"> | ||
<span th:if="${unsubscribeLink}"> | ||
<a href="#" style="color: #f9a825; text-decoration: none;">Help & Support</a> | ||
<span style="color: #666666; padding: 0 5px;">|</span> | ||
</span> | ||
<a href="#" style="color: #f9a825; text-decoration: none;">Privacy Policy</a> | ||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |