Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

misc: added email formatting for remaining templates

Sheen Capadngan8e373fe9bfb1
diff --git a/backend/src/services/smtp/smtp-service.ts b/backend/src/services/smtp/smtp-service.ts
index 5e090b4c61..95407d0b0a 100644
--- a/backend/src/services/smtp/smtp-service.ts
+++ b/backend/src/services/smtp/smtp-service.ts
@@ -51,7 +51,7 @@ export const smtpServiceFactory = (cfg: TSmtpConfig) => {
const appCfg = getConfig();
const html = await fs.readFile(path.resolve(__dirname, "./templates/", template), "utf8");
const temp = handlebars.compile(html);
- const htmlToSend = temp({ ...substitutions, isCloud: appCfg.isCloud });
+ const htmlToSend = temp({ isCloud: appCfg.isCloud, siteUrl: appCfg.SITE_URL, ...substitutions });
if (isSmtpOn) {
await smtp.sendMail({
diff --git a/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars b/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars
index 3cb517a573..0798538fbd 100644
--- a/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars
+++ b/backend/src/services/smtp/templates/historicalSecretLeakIncident.handlebars
@@ -9,12 +9,12 @@
<body>
<h3>Infisical has uncovered {{numberOfSecrets}} secret(s) from historical commits to your repo</h3>
- <p><a href="https://app.infisical.com/secret-scanning"><strong>View leaked secrets</strong></a></p>
+ <p><a href="{{siteUrl}}/secret-scanning"><strong>View leaked secrets</strong></a></p>
<p>If these are production secrets, please rotate them immediately.</p>
<p>Once you have taken action, be sure to update the status of the risk in your <a
- href="https://app.infisical.com/">Infisical
+ href="{{siteUrl}}">Infisical
dashboard</a>.</p>
</body>
diff --git a/backend/src/services/smtp/templates/secretLeakIncident.handlebars b/backend/src/services/smtp/templates/secretLeakIncident.handlebars
index 1bf2d3175e..c3c5f353a6 100644
--- a/backend/src/services/smtp/templates/secretLeakIncident.handlebars
+++ b/backend/src/services/smtp/templates/secretLeakIncident.handlebars
@@ -9,7 +9,7 @@
<body>
<h3>Infisical has uncovered {{numberOfSecrets}} secret(s) from your recent push</h3>
- <p><a href="https://app.infisical.com/secret-scanning"><strong>View leaked secrets</strong></a></p>
+ <p><a href="{{siteUrl}}/secret-scanning"><strong>View leaked secrets</strong></a></p>
<p>You are receiving this notification because one or more secret leaks have been detected in a recent commit pushed
by {{pusher_name}} ({{pusher_email}}). If
these are test secrets, please add `infisical-scan:ignore` at the end of the line containing the secret as comment
@@ -18,7 +18,7 @@
<p>If these are production secrets, please rotate them immediately.</p>
<p>Once you have taken action, be sure to update the status of the risk in your <a
- href="https://app.infisical.com/">Infisical
+ href="{{siteUrl}}">Infisical
dashboard</a>.</p>
</body>
diff --git a/backend/src/services/smtp/templates/signupEmailVerification.handlebars b/backend/src/services/smtp/templates/signupEmailVerification.handlebars
index fc738d2023..3ba18619f3 100644
--- a/backend/src/services/smtp/templates/signupEmailVerification.handlebars
+++ b/backend/src/services/smtp/templates/signupEmailVerification.handlebars
@@ -11,7 +11,7 @@
<h2>Confirm your email address</h2>
<p>Your confirmation code is below — enter it in the browser window where you've started signing up for Infisical.</p>
<h1>{{code}}</h1>
- <p>Questions about setting up Infisical? Email us at [email protected]</p>
+ <p>Questions about setting up Infisical? {{#if isCloud}}Email us at [email protected]{{else}}Contact your administrator{{/if}}.</p>
</body>
</html>
\ No newline at end of file