-
-
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.
-> Email Template
- Loading branch information
Showing
11 changed files
with
837 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace MythicalSystemsFramework\Mail\Templates; | ||
use MythicalSystemsFramework\Mail\EmailTemplate; | ||
use MythicalSystemsFramework\Mail\MailService; | ||
use MythicalSystemsFramework\User\UserDataHandler; | ||
|
||
class Verification extends MailService { | ||
public static function sendMail(string $uuid) : void { | ||
if (self::doesTemplateExist("verify")) { | ||
$template = self::getTemplate("verify"); | ||
$template = self::processTemplateSystemLevel($template); | ||
$template = self::processTemplateUserLevel($template, UserDataHandler::getTokenByUserID($uuid)); | ||
die($template); | ||
} else { | ||
return; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
global $router; | ||
|
||
$router->add('/emails/welcome', function () { | ||
$file = file_get_contents(__DIR__ . '/../../../storage/mails/welcome.html'); | ||
echo die($file); | ||
}); | ||
|
||
|
||
$router->add('/emails/reset-password', function () { | ||
$file = file_get_contents(__DIR__ . '/../../../storage/mails/reset-password.html'); | ||
echo die($file); | ||
}); | ||
|
||
$router->add('/emails/user-banned', function () { | ||
$file = file_get_contents(__DIR__ . '/../../../storage/mails/user-banned.html'); | ||
echo die($file); | ||
}); | ||
|
||
|
||
$router->add('/emails/login', function () { | ||
$file = file_get_contents(__DIR__ . '/../../../storage/mails/login.html'); | ||
echo die($file); | ||
}); | ||
|
||
$router->add('/emails/notification', function () { | ||
$file = file_get_contents(__DIR__ . '/../../../storage/mails/notification.html'); | ||
echo die($file); | ||
}); |
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,141 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="x-apple-disable-message-reformatting"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no"> | ||
<!--[if mso]> | ||
<xml><o:officedocumentsettings><o:pixelsperinch>96</o:pixelsperinch></o:officedocumentsettings></xml> | ||
<![endif]--> | ||
<title>New Account Login</title> | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Montserrat:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700" | ||
rel="stylesheet" media="screen"> | ||
<style> | ||
.hover-underline:hover { | ||
text-decoration: underline !important; | ||
} | ||
|
||
@media (max-width: 600px) { | ||
.sm-w-full { | ||
width: 100% !important; | ||
} | ||
|
||
.sm-px-24 { | ||
padding-left: 24px !important; | ||
padding-right: 24px !important; | ||
} | ||
|
||
.sm-py-32 { | ||
padding-top: 32px !important; | ||
padding-bottom: 32px !important; | ||
} | ||
|
||
.sm-leading-32 { | ||
line-height: 32px !important; | ||
} | ||
} | ||
</style> | ||
</head> | ||
|
||
<body | ||
style="margin: 0; width: 100%; padding: 0; word-break: break-word; -webkit-font-smoothing: antialiased; background-color: #eceff1;"> | ||
<div style="font-family: 'Montserrat', sans-serif; display: none;">New Account Login</div> | ||
<div role="article" aria-roledescription="email" aria-label="New Account Login" lang="en" | ||
style="font-family: 'Montserrat', sans-serif;"> | ||
<table style="width: 100%; font-family: Montserrat, -apple-system, 'Segoe UI', sans-serif;" cellpadding="0" | ||
cellspacing="0" role="presentation"> | ||
<tr> | ||
<td align="center" | ||
style="background-color: #eceff1; font-family: Montserrat, -apple-system, 'Segoe UI', sans-serif;"> | ||
<table class="sm-w-full" style="width: 600px;" cellpadding="0" cellspacing="0" role="presentation"> | ||
<tr> | ||
<td class="sm-py-32 sm-px-24" | ||
style="padding: 48px; text-align: center; font-family: Montserrat, -apple-system, 'Segoe UI', sans-serif;"> | ||
|
||
</td> | ||
</tr> | ||
<tr> | ||
<td align="center" class="sm-px-24" | ||
style="font-family: 'Montserrat', sans-serif;"> | ||
<table style="width: 100%;" cellpadding="0" cellspacing="0" role="presentation"> | ||
<tr> | ||
<td class="sm-px-24" | ||
style="border-radius: 4px; background-color: #ffffff; padding: 48px; text-align: left; font-family: Montserrat, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 24px; color: #626262;"> | ||
<p | ||
style="font-family: 'Montserrat', sans-serif; margin-bottom: 0; font-size: 20px; font-weight: 600;"> | ||
Hello</p> | ||
<p | ||
style="font-family: 'Montserrat', sans-serif; margin-top: 0; font-size: 24px; font-weight: 700; color: #ff5850;"> | ||
{first_name} {last_name} ({username})!</p> | ||
<p class="sm-leading-32" | ||
style="font-family: 'Montserrat', sans-serif; margin: 0; margin-bottom: 16px; font-size: 24px; font-weight: 600; color: #263238;"> | ||
New Account Login Detected | ||
</p> | ||
<p | ||
style="font-family: 'Montserrat', sans-serif; margin: 0; margin-bottom: 24px;"> | ||
We noticed a new login to your account from a different location. If this was you, you can ignore this email. If you didn't initiate this login, please take immediate action to secure your account. | ||
</p> | ||
<p | ||
style="font-family: 'Montserrat', sans-serif; margin: 0; margin-bottom: 24px;"> | ||
If you need any assistance or have any concerns, please contact our support team at | ||
<a href="mailto:{support_mail}" class="hover-underline" | ||
style="font-family: 'Montserrat', sans-serif; color: #7367f0; text-decoration: none;">{support_mail}</a> | ||
</p> | ||
<table cellpadding="0" cellspacing="0" role="presentation"> | ||
<tr> | ||
<td | ||
style="border-radius: 4px; background-color: #7367f0; font-family: Montserrat, -apple-system, 'Segoe UI', sans-serif;"> | ||
<a href="https://{app_url}/account" | ||
style="font-family: 'Montserrat', sans-serif; display: block; padding-left: 24px; padding-right: 24px; padding-top: 16px; padding-bottom: 16px; font-size: 16px; font-weight: 600; line-height: 100%; color: #ffffff; text-decoration: none;">Secure Your Account →</a> | ||
</td> | ||
</tr> | ||
</table> | ||
<table style="width: 100%;" cellpadding="0" cellspacing="0" | ||
role="presentation"> | ||
<tr> | ||
<td | ||
style="font-family: 'Montserrat', sans-serif; padding-top: 32px; padding-bottom: 32px;"> | ||
<div | ||
style="font-family: 'Montserrat', sans-serif; height: 1px; background-color: #eceff1; line-height: 1px;"> | ||
‌</div> | ||
</td> | ||
</tr> | ||
</table> | ||
<p | ||
style="font-family: 'Montserrat', sans-serif; margin: 0; margin-bottom: 16px;"> | ||
If you believe this login was unauthorized, please | ||
<a href="mailto:{support_mail}" class="hover-underline" | ||
style="font-family: 'Montserrat', sans-serif; color: #7367f0; text-decoration: none;">contact us immediately</a>. | ||
</p> | ||
<p | ||
style="font-family: 'Montserrat', sans-serif; margin: 0; margin-bottom: 16px;"> | ||
Thank you, <br>The {app_name} Team</p> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td style="font-family: 'Montserrat', sans-serif; height: 20px;"></td> | ||
</tr> | ||
<tr> | ||
<td | ||
style="padding-left: 48px; padding-right: 48px; font-family: Montserrat, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; color: #eceff1;"> | ||
|
||
</td> | ||
</tr> | ||
<tr> | ||
<td style="font-family: 'Montserrat', sans-serif; height: 16px;"></td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.