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 LetterTemplate.TierWarning

Blue Mouse1f7b5888e404
diff --git a/src/mailer/letter.ts b/src/mailer/letter.ts
index 682c1feb7..dee8a2938 100644
--- a/src/mailer/letter.ts
+++ b/src/mailer/letter.ts
@@ -7,4 +7,5 @@ export enum LetterTemplate {
PasswordChangeRequest = 'password-change_request',
GDPRDataExport = 'gdpr_data_export',
ProjectReport = 'project-report',
+ TierWarning = 'tier-warning',
}
diff --git a/src/mailer/mailer.service.ts b/src/mailer/mailer.service.ts
index d8d9a6ccb..14e870996 100644
--- a/src/mailer/mailer.service.ts
+++ b/src/mailer/mailer.service.ts
@@ -5,6 +5,7 @@ import { LetterTemplate } from './letter'
import fs = require('fs')
import path = require('path')
import { AppLoggerService } from 'src/logger/logger.service'
+import { SEND_WARNING_AT_PERC } from 'src/common/constants'
const TEMPLATES_PATH = path.join(__dirname, '..', 'common', 'templates')
const metaInfoJson = {
@@ -48,6 +49,11 @@ const metaInfoJson = {
en: (p: Params) => `${p.type === 'w' ? 'Weekly' : 'Monthly'} Report: ${p.date}`,
},
},
+ [LetterTemplate.TierWarning]: {
+ subject: {
+ en: () => `You have used more than ${SEND_WARNING_AT_PERC}% of the available events per your tier for this month.`,
+ },
+ }
}
interface Params {