Skip to content

Commit 024dd92

Browse files
authored
mining success email: add GDPR notice (#2502)
* gdpr * Update template.ts
1 parent 9b03574 commit 024dd92

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

supabase/functions/mail/i18n/messages.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@
2121
"line1": "You received this email as a notification about your recent activity on",
2222
"brand": "leadminer",
2323
"line2": "Extract, clean, and enrich your contacts — effortlessly."
24+
},
25+
"start_mining_toast": {
26+
"summary": "Your contacts got rights",
27+
"detail_1": "You'll need your contacts consent or a legitimate interest to reach them.",
28+
"detail_2": "Learn more about your contacts rights."
2429
}
2530
},
31+
2632
"fr": {
2733
"subject": "✅ Extraction terminée",
2834
"headerTitle": "🎉 Extraction terminée !",
@@ -45,6 +51,11 @@
4551
"line1": "Vous recevez cet e-mail en tant que notification concernant votre récente activité sur",
4652
"brand": "leadminer",
4753
"line2": "Extrayez, nettoyez et enrichissez vos contacts — sans effort."
54+
},
55+
"start_mining_toast": {
56+
"summary": "Vos contacts ont des droits",
57+
"detail_1": "Vous aurez besoin du consentement de vos contacts ou d'un intérêt légitime pour les contacter.",
58+
"detail_2": "En savoir plus sur les droits de vos contacts."
4859
}
4960
}
5061
}

supabase/functions/mail/mining-complete/template.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import i18nData from "../i18n/messages.json" with { type: "json" };
22

33
const LOGO_URL = Deno.env.get("LOGO_URL");
44
const FRONTEND_HOST = Deno.env.get("FRONTEND_HOST");
5+
const LEADMINER_DATA_PRIVACY_URL = "https://www.leadminer.io/data-privacy";
56

67
/**
78
* Simple template interpolator: replaces {var} with provided values
@@ -33,11 +34,11 @@ export default function buildEmail(
3334

3435
const bodyContent = hasNoNewContacts
3536
? `
36-
<p style="font-size: 17px; margin: 0 0 16px; text-align: center;">
37+
<p style="font-size: 17px; margin: 0 0 15px; text-align: center;">
3738
${i18n.noNewContactsBody}
3839
</p>
3940
40-
<table role="presentation" align="center" style="margin-top: 30px;">
41+
<table role="presentation" align="center" style="margin-top: 15px;">
4142
<tr>
4243
<td align="center" style="padding-right: 10px;">
4344
<a
@@ -75,15 +76,15 @@ export default function buildEmail(
7576
</table>
7677
`
7778
: `
78-
<p style="font-size: 17px; margin: 0 0 16px">
79+
<p style="font-size: 17px; margin: 0 0 15px">
7980
${i18n.recapIntro}
8081
</p>
8182
8283
<ul
8384
style="
8485
list-style: none;
8586
padding: 0;
86-
margin: 24px 0;
87+
margin: 15px 0;
8788
font-size: 15px;
8889
line-height: 1.8;
8990
"
@@ -106,7 +107,7 @@ export default function buildEmail(
106107
}
107108
</ul>
108109
109-
<table role="presentation" align="center" style="margin-top: 30px;">
110+
<table role="presentation" align="center" style="margin-top: 15px;">
110111
<tr>
111112
<td align="center" style="padding-right: 10px;">
112113
<a
@@ -142,6 +143,11 @@ export default function buildEmail(
142143
</td>
143144
</tr>
144145
</table>
146+
<div style="margin-top: 15px; font-size: 13px; color: #6b7280; text-align: center;">
147+
<div>${i18n.start_mining_toast.summary}</div>
148+
<div>${i18n.start_mining_toast.detail_1}</div>
149+
<a href="${LEADMINER_DATA_PRIVACY_URL}" style="color: #6b7280;">${i18n.start_mining_toast.detail_2}</a>
150+
</div>
145151
`;
146152

147153
const html = `

0 commit comments

Comments
 (0)