From ae5d7ad012b9216965fd3134f5d0ec1bb087e705 Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Thu, 9 May 2024 09:15:08 +0100 Subject: [PATCH] chore: update verification email content --- apps/backend/src/utils/withEmailTemplate.js | 2 +- .../Org/VerifyEmail/VerifyEmailModal.svelte | 1 + .../src/lib/utils/services/notification/template.ts | 2 +- .../src/routes/api/email/verify_email/+server.js | 12 +++++++----- apps/dashboard/src/routes/onboarding/+page.svelte | 5 +++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/backend/src/utils/withEmailTemplate.js b/apps/backend/src/utils/withEmailTemplate.js index 796cf6a0..9795deaf 100644 --- a/apps/backend/src/utils/withEmailTemplate.js +++ b/apps/backend/src/utils/withEmailTemplate.js @@ -145,7 +145,7 @@ const withEmailTemplate = (content) =>
ClassroomIO Logo
diff --git a/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte b/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte index 18ddc34f..2035a121 100644 --- a/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte +++ b/apps/dashboard/src/lib/components/Org/VerifyEmail/VerifyEmailModal.svelte @@ -27,6 +27,7 @@ triggerSendEmail(NOTIFICATION_NAME.VERIFY_EMAIL, { to: $profile.email, profileId: $profile.id, + fullname: $profile.fullname, orgSiteName: $currentOrg.siteName }); diff --git a/apps/dashboard/src/lib/utils/services/notification/template.ts b/apps/dashboard/src/lib/utils/services/notification/template.ts index 6c9ce395..79661963 100644 --- a/apps/dashboard/src/lib/utils/services/notification/template.ts +++ b/apps/dashboard/src/lib/utils/services/notification/template.ts @@ -145,7 +145,7 @@ export const withEmailTemplate = (content: string) =>
ClassroomIO Logo
diff --git a/apps/dashboard/src/routes/api/email/verify_email/+server.js b/apps/dashboard/src/routes/api/email/verify_email/+server.js index b5d5ca2f..db5a4a7a 100644 --- a/apps/dashboard/src/routes/api/email/verify_email/+server.js +++ b/apps/dashboard/src/routes/api/email/verify_email/+server.js @@ -5,7 +5,7 @@ import sendEmail from '$mail/sendEmail'; const supabase = getSupabase(); export async function POST({ request }) { - const { to, profileId, orgSiteName } = await request.json(); + const { to, profileId, orgSiteName, fullname } = await request.json(); const accessToken = request.headers.get('Authorization'); console.log('/POST api/email/verify_email', to, profileId); @@ -38,13 +38,15 @@ export async function POST({ request }) { const emailData = [ { to, - subject: '[ClassroomIO]: Verify your email', + subject: 'Action Required: Confirm your email', content: ` -

Thank you for signing up

-

To verify your email, please click the Verify button below

+

Hi ${fullname} 👋

+

Welcome to ClassroomIO, new friend! In order to get your account ready for usage, we need to verify your email.

+

We do this to make sure we don't get fake user emails in our signup. To get the best out of our product, we'll need you to verify your email by clicking the Verify button below +

Verify -
+ `, isPersonalEmail: true } diff --git a/apps/dashboard/src/routes/onboarding/+page.svelte b/apps/dashboard/src/routes/onboarding/+page.svelte index e17bc94f..58d02423 100644 --- a/apps/dashboard/src/routes/onboarding/+page.svelte +++ b/apps/dashboard/src/routes/onboarding/+page.svelte @@ -25,7 +25,7 @@ siteName?: string; goal?: string; source?: string; - locale?: string; + locale?: LOCALE; metadata?: {}; } @@ -39,7 +39,7 @@ fullname: '', orgName: '', siteName: '', - locale: '' + locale: LOCALE.EN }; let errors: OnboardingField = {}; let progress = 50; @@ -212,6 +212,7 @@ triggerSendEmail(NOTIFICATION_NAME.VERIFY_EMAIL, { to: $profile.email, profileId: $profile.id, + fullname: $profile.fullname, orgSiteName: fields.siteName });