Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Added email templates for common actions like sign up or password recovery

Blue Mouse6c7eec6bd704
diff --git a/.env.example b/.env.example
index fd2d7c050..cc4203a08 100644
--- a/.env.example
+++ b/.env.example
@@ -24,5 +24,5 @@ SMTP_USER='smtp_user_name'
SMTP_PASSWORD='smtp_password'
FROM_EMAIL='[email protected]'
-# Use SMTP_MOCK variable for development
+# Use SMTP_MOCK variable for development, leave empty when in production
SMTP_MOCK=true
diff --git a/src/common/templates/en/.gitkeep b/src/common/templates/en/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/src/common/templates/en/customer_sign-up.html b/src/common/templates/en/customer_sign-up.html
new file mode 100644
index 000000000..4b2aefc62
--- /dev/null
+++ b/src/common/templates/en/customer_sign-up.html
@@ -0,0 +1,267 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Registration at swetrix.com</title>
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet" />
+ </head>
+ <body style="margin: 0; padding: 0; background-color: #f0f4f7;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background: #f0f4f7; min-width: 340px; font-size: 1px; line-height: normal;">
+ <tr>
+ <td align="center" valign="top" bgcolor="#f0f4f7">
+ <!--[if (gte mso 9)|(IE)]>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr><td align="center" valign="top" width="750"><![endif]-->
+ <table cellpadding="0" cellspacing="0" border="0" width="750" style="width: 100%; max-width: 750px; min-width: 340px; background: #f0f4f7;">
+ <tr>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ <td align="center" valign="top" style="background: #ffffff;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="right" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 23px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;">
+ <img src="file:///home/rand/Downloads/blue_logo.png" alt="Swetrix Analytics" width="175" border="0" style="display: block; width: 175px;" />
+ </a>
+ <div style="height: 40px; line-height: 40px; font-size: 40px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font align="center" style="font-size: 52px; line-height: 55px; font-weight: 300; letter-spacing: -1.5px;">
+ <span
+ align="center"
+ style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 44px; color: #1a1a1a;"
+ >
+ Welcome at Swetrix Analytics!
+ </span>
+ </font>
+ <div style="height: 10px; line-height: 10px; font-size: 9px;">&nbsp;</div>
+ <font style="font-size: 36px; line-height: 45px; font-weight: 300; letter-spacing: -1px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #5e5e5e;
+ font-size: 30px;
+ line-height: 45px;
+ font-weight: 300;
+ letter-spacing: -1px;
+ "
+ >
+ Please verify your account registration
+ </span>
+ </font>
+ <div style="height: 38px; line-height: 38px; font-size: 36px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ Thank you for registration at swetrix.com.<br />
+ We provide an advanced and customisable analytics service for your web applications.<br />
+ Track every metric you need without invading your users privacy.
+ </span>
+ </font>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <table cellpadding="0" cellspacing="0" border="0" style="background: #4f46e5; border-radius: 4px;">
+ <tr>
+ <td align="center" valign="top">
+ <a
+ href="{{url}}"
+ target="_blank"
+ style="
+ display: block;
+ border: 1px solid #4f46e5;
+ border-radius: 4px;
+ padding: 19px 26px;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 20px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ <font face="'Source Sans Pro', sans-serif" color="#ffffff" style="font-size: 26px; line-height: 30px; text-decoration: none; white-space: nowrap; font-weight: 600;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 26px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ Verify registration
+ </span>
+ </font>
+ </a>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ If you’re having trouble with the button above, copy and paste the URL below directly into your web browser:<br />
+ {{url}}
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table
+ cellpadding="0"
+ cellspacing="0"
+ border="0"
+ width="88%"
+ style="width: 88% !important; min-width: 88%; max-width: 88%; border-width: 1px; border-style: solid; border-color: #e8e8e8; border-bottom: none; border-left: none; border-right: none;"
+ >
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 20px; line-height: 20px; font-size: 18px;">&nbsp;</div>
+ <font face="'Source Sans Pro', sans-serif" color="#8c8c8c" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #8c8c8c;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ If you did not request this email, feel free to ignore it :)
+ </span>
+ </font>
+ <div style="height: 25px; line-height: 25px; font-size: 38px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 32px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Terms of Service
+ </a>
+ </span>
+ </font>
+ <font face="'Source Sans Pro', sans-serif" color="#3c4858" style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ </span>
+ </font>
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Privacy Policy
+ </a>
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 25px; line-height: 25px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ </tr>
+ </table>
+ <!--[if (gte mso 9)|(IE)]>
+ </td></tr>
+ </table><![endif]-->
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/src/common/templates/en/mailaddress-change_confirmation.html b/src/common/templates/en/mailaddress-change_confirmation.html
new file mode 100644
index 000000000..3927b79ec
--- /dev/null
+++ b/src/common/templates/en/mailaddress-change_confirmation.html
@@ -0,0 +1,239 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Email change at swetrix.com</title>
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet" />
+ </head>
+ <body style="margin: 0; padding: 0; background-color: #f0f4f7;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background: #f0f4f7; min-width: 340px; font-size: 1px; line-height: normal;">
+ <tr>
+ <td align="center" valign="top" bgcolor="#f0f4f7">
+ <!--[if (gte mso 9)|(IE)]>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr><td align="center" valign="top" width="750"><![endif]-->
+ <table cellpadding="0" cellspacing="0" border="0" width="750" style="width: 100%; max-width: 750px; min-width: 340px; background: #f0f4f7;">
+ <tr>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ <td align="center" valign="top" style="background: #ffffff;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="right" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 23px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;">
+ <img src="file:///home/rand/Downloads/blue_logo.png" alt="Swetrix Analytics" width="175" border="0" style="display: block; width: 175px;" />
+ </a>
+ <div style="height: 40px; line-height: 40px; font-size: 40px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font align="center" style="font-size: 52px; line-height: 55px; font-weight: 300; letter-spacing: -1.5px;">
+ <span
+ align="center"
+ style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 44px; color: #1a1a1a;"
+ >
+ Profile updates
+ </span>
+ </font>
+ <div style="height: 10px; line-height: 10px; font-size: 9px;">&nbsp;</div>
+ <font style="font-size: 36px; line-height: 45px; font-weight: 300; letter-spacing: -1px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #5e5e5e;
+ font-size: 30px;
+ line-height: 45px;
+ font-weight: 300;
+ letter-spacing: -1px;
+ "
+ >
+ Please confirm email address change
+ </span>
+ </font>
+ <div style="height: 38px; line-height: 38px; font-size: 36px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ You have changed your email address at swetrix.com<br />
+ The new email will only be applied after you have confirmed this action by pressing the button below
+ </span>
+ </font>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <table cellpadding="0" cellspacing="0" border="0" style="background: #4f46e5; border-radius: 4px;">
+ <tr>
+ <td align="center" valign="top">
+ <a
+ href="{{url}}"
+ target="_blank"
+ style="
+ display: block;
+ border: 1px solid #4f46e5;
+ border-radius: 4px;
+ padding: 19px 26px;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 20px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ <font face="'Source Sans Pro', sans-serif" color="#ffffff" style="font-size: 26px; line-height: 30px; text-decoration: none; white-space: nowrap; font-weight: 600;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 26px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ Confirm email update
+ </span>
+ </font>
+ </a>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ If you have not changed your email, please contact us at [email protected]
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 32px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Terms of Service
+ </a>
+ </span>
+ </font>
+ <font face="'Source Sans Pro', sans-serif" color="#3c4858" style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ </span>
+ </font>
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Privacy Policy
+ </a>
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 25px; line-height: 25px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ </tr>
+ </table>
+ <!--[if (gte mso 9)|(IE)]>
+ </td></tr>
+ </table><![endif]-->
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/src/common/templates/en/mailaddress-change_information.html b/src/common/templates/en/mailaddress-change_information.html
new file mode 100644
index 000000000..21516ed6d
--- /dev/null
+++ b/src/common/templates/en/mailaddress-change_information.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>swetrix.com email address have been updated</title>
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet" />
+ </head>
+ <body style="margin: 0; padding: 0; background-color: #f0f4f7;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background: #f0f4f7; min-width: 340px; font-size: 1px; line-height: normal;">
+ <tr>
+ <td align="center" valign="top" bgcolor="#f0f4f7">
+ <!--[if (gte mso 9)|(IE)]>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr><td align="center" valign="top" width="750"><![endif]-->
+ <table cellpadding="0" cellspacing="0" border="0" width="750" style="width: 100%; max-width: 750px; min-width: 340px; background: #f0f4f7;">
+ <tr>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ <td align="center" valign="top" style="background: #ffffff;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="right" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 23px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;">
+ <img src="file:///home/rand/Downloads/blue_logo.png" alt="Swetrix Analytics" width="175" border="0" style="display: block; width: 175px;" />
+ </a>
+ <div style="height: 40px; line-height: 40px; font-size: 40px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font align="center" style="font-size: 52px; line-height: 55px; font-weight: 300; letter-spacing: -1.5px;">
+ <span
+ align="center"
+ style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 44px; color: #1a1a1a;"
+ >
+ Email address update
+ </span>
+ </font>
+ <div style="height: 10px; line-height: 10px; font-size: 9px;">&nbsp;</div>
+ <font style="font-size: 36px; line-height: 45px; font-weight: 300; letter-spacing: -1px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #5e5e5e;
+ font-size: 30px;
+ line-height: 45px;
+ font-weight: 300;
+ letter-spacing: -1px;
+ "
+ >
+ You email address has been updated
+ </span>
+ </font>
+ <div style="height: 38px; line-height: 38px; font-size: 36px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ Your email address at swetrix.com has been successfully changed<br />
+ If you have not done so, please contact us at [email protected]
+ </span>
+ </font>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 32px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Terms of Service
+ </a>
+ </span>
+ </font>
+ <font face="'Source Sans Pro', sans-serif" color="#3c4858" style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ </span>
+ </font>
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Privacy Policy
+ </a>
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 25px; line-height: 25px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ </tr>
+ </table>
+ <!--[if (gte mso 9)|(IE)]>
+ </td></tr>
+ </table><![endif]-->
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/src/common/templates/en/password-change_confirmation.html b/src/common/templates/en/password-change_confirmation.html
new file mode 100644
index 000000000..8f8aef23d
--- /dev/null
+++ b/src/common/templates/en/password-change_confirmation.html
@@ -0,0 +1,239 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Password change at swetrix.com</title>
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet" />
+ </head>
+ <body style="margin: 0; padding: 0; background-color: #f0f4f7;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background: #f0f4f7; min-width: 340px; font-size: 1px; line-height: normal;">
+ <tr>
+ <td align="center" valign="top" bgcolor="#f0f4f7">
+ <!--[if (gte mso 9)|(IE)]>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr><td align="center" valign="top" width="750"><![endif]-->
+ <table cellpadding="0" cellspacing="0" border="0" width="750" style="width: 100%; max-width: 750px; min-width: 340px; background: #f0f4f7;">
+ <tr>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ <td align="center" valign="top" style="background: #ffffff;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="right" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 23px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;">
+ <img src="file:///home/rand/Downloads/blue_logo.png" alt="Swetrix Analytics" width="175" border="0" style="display: block; width: 175px;" />
+ </a>
+ <div style="height: 40px; line-height: 40px; font-size: 40px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font align="center" style="font-size: 52px; line-height: 55px; font-weight: 300; letter-spacing: -1.5px;">
+ <span
+ align="center"
+ style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 44px; color: #1a1a1a;"
+ >
+ Profile updates
+ </span>
+ </font>
+ <div style="height: 10px; line-height: 10px; font-size: 9px;">&nbsp;</div>
+ <font style="font-size: 36px; line-height: 45px; font-weight: 300; letter-spacing: -1px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #5e5e5e;
+ font-size: 30px;
+ line-height: 45px;
+ font-weight: 300;
+ letter-spacing: -1px;
+ "
+ >
+ Please confirm the password change
+ </span>
+ </font>
+ <div style="height: 38px; line-height: 38px; font-size: 36px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ You have changed your password at swetrix.com<br />
+ The new password will only be applied after you have confirmed this action by pressing the button below
+ </span>
+ </font>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <table cellpadding="0" cellspacing="0" border="0" style="background: #4f46e5; border-radius: 4px;">
+ <tr>
+ <td align="center" valign="top">
+ <a
+ href="{{url}}"
+ target="_blank"
+ style="
+ display: block;
+ border: 1px solid #4f46e5;
+ border-radius: 4px;
+ padding: 19px 26px;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 20px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ <font face="'Source Sans Pro', sans-serif" color="#ffffff" style="font-size: 26px; line-height: 30px; text-decoration: none; white-space: nowrap; font-weight: 600;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 26px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ Confirm password change
+ </span>
+ </font>
+ </a>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ If you have not changed your password, please contact us at [email protected]
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 32px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Terms of Service
+ </a>
+ </span>
+ </font>
+ <font face="'Source Sans Pro', sans-serif" color="#3c4858" style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ </span>
+ </font>
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Privacy Policy
+ </a>
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 25px; line-height: 25px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ </tr>
+ </table>
+ <!--[if (gte mso 9)|(IE)]>
+ </td></tr>
+ </table><![endif]-->
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/src/common/templates/en/password-change_information.html b/src/common/templates/en/password-change_information.html
new file mode 100644
index 000000000..a29d8eac1
--- /dev/null
+++ b/src/common/templates/en/password-change_information.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>swetrix.com password have been updated</title>
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet" />
+ </head>
+ <body style="margin: 0; padding: 0; background-color: #f0f4f7;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background: #f0f4f7; min-width: 340px; font-size: 1px; line-height: normal;">
+ <tr>
+ <td align="center" valign="top" bgcolor="#f0f4f7">
+ <!--[if (gte mso 9)|(IE)]>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr><td align="center" valign="top" width="750"><![endif]-->
+ <table cellpadding="0" cellspacing="0" border="0" width="750" style="width: 100%; max-width: 750px; min-width: 340px; background: #f0f4f7;">
+ <tr>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ <td align="center" valign="top" style="background: #ffffff;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="right" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 23px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;">
+ <img src="file:///home/rand/Downloads/blue_logo.png" alt="Swetrix Analytics" width="175" border="0" style="display: block; width: 175px;" />
+ </a>
+ <div style="height: 40px; line-height: 40px; font-size: 40px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font align="center" style="font-size: 52px; line-height: 55px; font-weight: 300; letter-spacing: -1.5px;">
+ <span
+ align="center"
+ style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 44px; color: #1a1a1a;"
+ >
+ Password update
+ </span>
+ </font>
+ <div style="height: 10px; line-height: 10px; font-size: 9px;">&nbsp;</div>
+ <font style="font-size: 36px; line-height: 45px; font-weight: 300; letter-spacing: -1px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #5e5e5e;
+ font-size: 30px;
+ line-height: 45px;
+ font-weight: 300;
+ letter-spacing: -1px;
+ "
+ >
+ You password has been updated
+ </span>
+ </font>
+ <div style="height: 38px; line-height: 38px; font-size: 36px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ Your password at swetrix.com has been successfully changed<br />
+ If you have not done so, please contact us at [email protected]
+ </span>
+ </font>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 32px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Terms of Service
+ </a>
+ </span>
+ </font>
+ <font face="'Source Sans Pro', sans-serif" color="#3c4858" style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ </span>
+ </font>
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Privacy Policy
+ </a>
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 25px; line-height: 25px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ </tr>
+ </table>
+ <!--[if (gte mso 9)|(IE)]>
+ </td></tr>
+ </table><![endif]-->
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/src/common/templates/en/password-change_request.html b/src/common/templates/en/password-change_request.html
new file mode 100644
index 000000000..665ca5985
--- /dev/null
+++ b/src/common/templates/en/password-change_request.html
@@ -0,0 +1,239 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Password change at swetrix.com</title>
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet" />
+ </head>
+ <body style="margin: 0; padding: 0; background-color: #f0f4f7;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background: #f0f4f7; min-width: 340px; font-size: 1px; line-height: normal;">
+ <tr>
+ <td align="center" valign="top" bgcolor="#f0f4f7">
+ <!--[if (gte mso 9)|(IE)]>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr><td align="center" valign="top" width="750"><![endif]-->
+ <table cellpadding="0" cellspacing="0" border="0" width="750" style="width: 100%; max-width: 750px; min-width: 340px; background: #f0f4f7;">
+ <tr>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ <td align="center" valign="top" style="background: #ffffff;">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="right" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 23px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;">
+ <img src="file:///home/rand/Downloads/blue_logo.png" alt="Swetrix Analytics" width="175" border="0" style="display: block; width: 175px;" />
+ </a>
+ <div style="height: 40px; line-height: 40px; font-size: 40px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font align="center" style="font-size: 52px; line-height: 55px; font-weight: 300; letter-spacing: -1.5px;">
+ <span
+ align="center"
+ style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 44px; color: #1a1a1a;"
+ >
+ Password recovery
+ </span>
+ </font>
+ <div style="height: 10px; line-height: 10px; font-size: 9px;">&nbsp;</div>
+ <font style="font-size: 36px; line-height: 45px; font-weight: 300; letter-spacing: -1px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #5e5e5e;
+ font-size: 30px;
+ line-height: 45px;
+ font-weight: 300;
+ letter-spacing: -1px;
+ "
+ >
+ Please confirm the password change
+ </span>
+ </font>
+ <div style="height: 38px; line-height: 38px; font-size: 36px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ You (or someone else) have requested a password change for an account with this email address at swetrix.com.<br />
+ To change your password, please click on the button below.
+ </span>
+ </font>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <table cellpadding="0" cellspacing="0" border="0" style="background: #4f46e5; border-radius: 4px;">
+ <tr>
+ <td align="center" valign="top">
+ <a
+ href="{{url}}"
+ target="_blank"
+ style="
+ display: block;
+ border: 1px solid #4f46e5;
+ border-radius: 4px;
+ padding: 19px 26px;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 20px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ <font face="'Source Sans Pro', sans-serif" color="#ffffff" style="font-size: 26px; line-height: 30px; text-decoration: none; white-space: nowrap; font-weight: 600;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #ffffff;
+ font-size: 26px;
+ line-height: 30px;
+ text-decoration: none;
+ white-space: nowrap;
+ font-weight: 600;
+ "
+ >
+ Change password
+ </span>
+ </font>
+ </a>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 30px; line-height: 30px; font-size: 28px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="left" valign="top">
+ <font face="'Source Sans Pro', sans-serif" color="#7f7f7f" style="font-size: 17px; line-height: 23px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #7f7f7f;
+ font-size: 17px;
+ line-height: 23px;
+ "
+ >
+ If you didn't request this, please ignore this email. Your password won't change until you access the link above and create a new one.
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 40px; line-height: 40px; font-size: 38px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="width: 100% !important; min-width: 100%; max-width: 100%; background: #f0f4f7;">
+ <tr>
+ <td align="center" valign="top">
+ <div style="height: 25px; line-height: 25px; font-size: 32px;">&nbsp;</div>
+ <table cellpadding="0" cellspacing="0" border="0" width="88%" style="width: 88% !important; min-width: 88%; max-width: 88%;">
+ <tr>
+ <td align="center" valign="top">
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Terms of Service
+ </a>
+ </span>
+ </font>
+ <font face="'Source Sans Pro', sans-serif" color="#3c4858" style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ </span>
+ </font>
+ <font style="font-size: 17px; line-height: 20px;">
+ <span
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #1a1a1a;
+ font-size: 17px;
+ line-height: 20px;
+ "
+ >
+ <a
+ href="https://swetrix.com"
+ target="_blank"
+ style="
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ color: #3c4858;
+ font-size: 17px;
+ line-height: 20px;
+ text-decoration: none;
+ "
+ >
+ Privacy Policy
+ </a>
+ </span>
+ </font>
+ </td>
+ </tr>
+ </table>
+ <div style="height: 25px; line-height: 25px; font-size: 28px;">&nbsp;</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;">&nbsp;</td>
+ </tr>
+ </table>
+ <!--[if (gte mso 9)|(IE)]>
+ </td></tr>
+ </table><![endif]-->
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/src/mailer/letter.ts b/src/mailer/letter.ts
index e5ab7f8f5..4bd89b25a 100644
--- a/src/mailer/letter.ts
+++ b/src/mailer/letter.ts
@@ -1,9 +1,9 @@
export enum LetterTemplate {
- SignUp = 'guest_sign-up',
+ SignUp = 'customer_sign-up',
ConfirmPasswordChange = 'password-change_confirmation',
PasswordChanged = 'password-change_information',
MailAddressChangeConfirmation = 'mailaddress-change_confirmation',
MailAddressHadChanged = 'mailaddress-change_information',
PasswordChangeRequest = 'password-change_request',
GDPRDataExport = 'gdpr_data_export',
-}
\ No newline at end of file
+}
diff --git a/src/mailer/mailer.service.ts b/src/mailer/mailer.service.ts
index 0990d7941..4483fca1c 100644
--- a/src/mailer/mailer.service.ts
+++ b/src/mailer/mailer.service.ts
@@ -10,32 +10,37 @@ const TEMPLATES_PATH = path.join(__dirname, '..', 'common', 'templates')
const metaInfoJson = {
[LetterTemplate.SignUp]: {
subject: {
- EN: 'Please verify your account registration',
+ en: 'Please verify your account registration',
},
},
[LetterTemplate.ConfirmPasswordChange]: {
subject: {
- EN: 'Please confirm the password change',
+ en: 'Please confirm the password change',
},
},
[LetterTemplate.MailAddressChangeConfirmation]: {
subject: {
- EN: 'Please confirm the new e-mail address',
+ en: 'Please confirm the new e-mail address',
},
},
[LetterTemplate.MailAddressHadChanged]: {
subject: {
- EN: 'A new e-mail-address has been saved',
+ en: 'A new e-mail-address has been saved',
},
},
[LetterTemplate.PasswordChangeRequest]: {
subject: {
- EN: 'Changing your password',
+ en: 'Changing your password',
},
},
[LetterTemplate.PasswordChanged]: {
subject: {
- EN: 'Your password was successfully changed',
+ en: 'Your password was successfully changed',
+ },
+ },
+ [LetterTemplate.GDPRDataExport]: {
+ subject: {
+ en: 'Swetrix account data export',
},
},
}
@@ -47,19 +52,16 @@ interface Params {
@Injectable()
export class MailerService {
constructor(
- private readonly logger: AppLoggerService
+ private readonly logger: AppLoggerService,
) {}
async sendEmail(email: string, templateName: LetterTemplate, params: Params = null): Promise<void> {
try {
- // const templatePath = TEMPLATES_PATH +
- // '/' + 'en' +
- // '/' + templateName + '_en.html'
-
- // const letter = fs.readFileSync(templatePath, { encoding: 'utf-8' })
- // const subject = metaInfoJson[templateName]['subject']['EN']
- // const template = handlebars.compile(letter)
- // const htmlToSend = template(params)
+ const templatePath = `${TEMPLATES_PATH}/en/${templateName}.html`
+ const letter = fs.readFileSync(templatePath, { encoding: 'utf-8' })
+ const subject = metaInfoJson[templateName].subject.en
+ const template = handlebars.compile(letter)
+ const htmlToSend = template(params)
const transporter = nodemailer.createTransport({
host: process.env.SMTP_HOST,
@@ -68,19 +70,20 @@ export class MailerService {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASSWORD,
},
+ headers: {
+ 'X-PM-Message-Stream': 'outbound',
+ }
})
const message = {
from: {
- name: 'Analytics',
+ name: 'Swetrix Analytics',
address: process.env.FROM_EMAIL
},
to: email,
- // subject,
- // html: htmlToSend,
+ subject,
+ html: htmlToSend,
attachments: [],
-
- params, // temp var
}
if (process.env.SMTP_MOCK) {
@@ -88,15 +91,14 @@ export class MailerService {
} else {
transporter.sendMail(message, (err, info) => {
if (err) {
- console.log('Error in transporter.sendMail', err)
- console.log('Info in transporter.sendMail', info)
-
+ console.error('Error in transporter.sendMail', err)
+ console.error('Info in transporter.sendMail', info)
return process.exit(1)
}
})
}
} catch (error) {
- console.log(error)
+ console.error(error)
}
}
-}
\ No newline at end of file
+}
diff --git a/src/project/project.service.ts b/src/project/project.service.ts
index 600f410da..a11fd024c 100644
--- a/src/project/project.service.ts
+++ b/src/project/project.service.ts
@@ -60,6 +60,10 @@ export class ProjectService {
return this.projectsRepository.findOne(id)
}
+ findWhere(where: Record<string, unknown>): Promise<Project[]> {
+ return this.projectsRepository.find({ where })
+ }
+
findOneWhere(where: Record<string, unknown>): Promise<Project> {
return this.projectsRepository.findOne({ where })
}
diff --git a/src/user/user.controller.ts b/src/user/user.controller.ts
index 80cf90ac8..0f788a138 100644
--- a/src/user/user.controller.ts
+++ b/src/user/user.controller.ts
@@ -5,6 +5,7 @@ import { Request } from 'express'
import { ApiTags, ApiQuery } from '@nestjs/swagger'
import { UserService } from './user.service'
+import { ProjectService } from '../project/project.service'
import { User, UserType, MAX_EMAIL_REQUESTS } from './entities/user.entity'
import { Roles } from '../common/decorators/roles.decorator'
import { Pagination } from '../common/pagination/pagination'
@@ -26,9 +27,10 @@ export class UserController {
constructor(
private readonly userService: UserService,
private readonly authService: AuthService,
+ private readonly projectService: ProjectService,
private readonly actionTokensService: ActionTokensService,
private readonly mailerService: MailerService,
- private readonly logger: AppLoggerService
+ private readonly logger: AppLoggerService,
) {}
@Get('/')
@@ -184,10 +186,15 @@ export class UserController {
async exportUserData(@CurrentUserId() user_id: string): Promise<User> {
this.logger.log({ user_id }, 'GET /user/export')
const user = await this.userService.findOneWhere({ id: user_id })
+ const where = Object({ admin: user_id })
+ const projects = await this.projectService.findWhere(where)
+ console.log(user, projects)
// TODO: Add related projects and other user controlled objects into report
// TODO: Allow users to request exports only once per day
- await this.mailerService.sendEmail(user.email, LetterTemplate.GDPRDataExport)
+ await this.mailerService.sendEmail(user.email, LetterTemplate.GDPRDataExport, {
+ user, projects,
+ })
return user
}
diff --git a/src/user/user.module.ts b/src/user/user.module.ts
index cea68bce8..e31e20872 100644
--- a/src/user/user.module.ts
+++ b/src/user/user.module.ts
@@ -8,13 +8,16 @@ import { ActionTokensModule } from 'src/action-tokens/action-tokens.module'
import { MailerModule } from '../mailer/mailer.module'
import { AuthModule } from '../auth/auth.module'
import { AppLoggerModule } from '../logger/logger.module'
+import { ProjectModule } from '../project/project.module'
@Module({
imports: [
TypeOrmModule.forFeature([User]),
- ActionTokensModule, MailerModule,
+ ActionTokensModule,
+ MailerModule,
forwardRef(() => AuthModule),
- AppLoggerModule
+ AppLoggerModule,
+ ProjectModule,
],
providers: [UserService],
exports: [UserService],