📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
added invitation email
Blue Mouse62220e850f14
diff --git a/src/common/templates/en/customer_project-invitation.html b/src/common/templates/en/customer_project-invitation.htmlnew file mode 100644index 000000000..7e2d4d2cf--- /dev/null+++ b/src/common/templates/en/customer_project-invitation.html@@ -0,0 +1,227 @@+<!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>You have been invited to join the project</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;"> </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;"> </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;"> </div>+ <a href="https://swetrix.com" target="_blank" style="display: block; max-width: 173px;text-decoration: none;">+ <img src="https://swetrix.com/assets/logo_blue.png" alt="Swetrix" width="175" border="0" style="display: block; width: 175px; font-size: 32px;" />+ </a>+ <div style="height: 40px; line-height: 40px; font-size: 40px;"> </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;"+ >+ You have been invited to the project+ </span>+ </font>+ <div style="height: 38px; line-height: 38px; font-size: 36px;"> </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="#6d6d6d" 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: #6d6d6d;+ font-size: 17px;+ line-height: 23px;+ "+ >+ Hey!<br /><br />+ <a href="mailto:{{email}}">{{email}}</a> has invited you to the <b>{{name}}</b> website analytics dashboard with the role <b>{{role}}</b> on Swetrix.<br />+ Click the button below to accept the invitation or ignore this email if you do not want to join the project.<br />+ The invitation will expire in {{expiration}} hours.+ </span>+ </font>+ <div style="height: 30px; line-height: 30px; font-size: 28px;"> </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;+ "+ >+ Accept invitation+ </span>+ </font>+ </a>+ </td>+ </tr>+ </table>+ <div style="height: 30px; line-height: 30px; font-size: 28px;"> </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="#6d6d6d" 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: #6d6d6d;+ 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;"> </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;"> </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/terms"+ 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;+ "+ >+ | + </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/privacy"+ 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;"> </div>+ </td>+ </tr>+ </table>+ </td>+ <td width="25" style="width: 25px; max-width: 25px; min-width: 25px;"> </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.tsindex dee8a2938..cfbf8f810 100644--- a/src/mailer/letter.ts+++ b/src/mailer/letter.ts@@ -8,4 +8,5 @@ export enum LetterTemplate {GDPRDataExport = 'gdpr_data_export',ProjectReport = 'project-report',TierWarning = 'tier-warning',+ ProjectInvitation = 'customer_project-invitation',}diff --git a/src/mailer/mailer.service.ts b/src/mailer/mailer.service.tsindex 14e870996..d4fe6dd73 100644--- a/src/mailer/mailer.service.ts+++ b/src/mailer/mailer.service.ts@@ -53,6 +53,11 @@ const metaInfoJson = {subject: {en: () => `You have used more than ${SEND_WARNING_AT_PERC}% of the available events per your tier for this month.`,},+ },+ [LetterTemplate.ProjectInvitation]: {+ subject: {+ en: () => 'You have been invited to join the project.',+ },}}