From 08ca6cf7ea5071546c838603ed2d4480e7e8e261 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 20 Jun 2024 18:03:21 +0200 Subject: [PATCH] update email service --- shared/services/EmailService.ts | 127 +----- .../services/email_templates/WelcomeEmail.ts | 378 ++++++++++++++++++ 2 files changed, 387 insertions(+), 118 deletions(-) create mode 100644 shared/services/email_templates/WelcomeEmail.ts diff --git a/shared/services/EmailService.ts b/shared/services/EmailService.ts index 5a4a903..c8930fe 100644 --- a/shared/services/EmailService.ts +++ b/shared/services/EmailService.ts @@ -1,5 +1,6 @@ import nodemailer from 'nodemailer'; import type SMTPTransport from 'nodemailer/lib/smtp-transport'; +import { WELCOME_EMAIL } from './email_templates/WelcomeEmail'; @@ -103,122 +104,6 @@ const TemplateEmail50 = ` - -` -const TemplateEmailWelcome = ` - - - - - - - LitLyx Onboarding Email - - - - -
-
-

👋 Welcome to LitLyx!

-
-
-

We're Super happy to have you on board! 🚀 At LitLyx, we've designed our service to simplify your life by enabling real-time tracking of visits and custom events for your website or app with minimal setup.

-
-
-

👇 Let's Dive in 👇

-
-
- -
-
-

See the Documentation

-

Get familiar with our platform by checking out our comprehensive documentation. Everything you need to - know in 1 Min Read Time ⏱️.

- Go to Docs -
-
-

Visit the Live Demo

-

Experience LitLyx in action by visiting our live demo. See how our features can benefit you in real-time. - We give you a comprehensive dashboard to visualize data on litlyx itself!

- Visit Live Demo -
-
-

Book a Demo & Became an Early-Adopter

-

Want to became an early-adopter? Book a demo with me!I'm Antonio & i'll guide you through all the - features and benefits of LitLyx. A big discount is waiting for you❗️❗️❗️

- Book a Demo with Me! -
- -
- - ` @@ -228,7 +113,13 @@ class EmailService { createTransport(service: string, host: string, user: string, pass: string) { this.transport = nodemailer.createTransport({ - service, host, auth: { user, pass } + host, + secure: true, + auth: { user, pass }, + tls: { + minVersion: 'TLSv1', + ciphers: 'HIGH:MEDIUM:!aNULL:!eNULL:@STRENGTH:!DH:!kEDH' + } }); } @@ -255,7 +146,7 @@ class EmailService { from: 'helplitlyx@gmail.com', to: target, subject: 'Welcome to Litlyx', - html: TemplateEmailWelcome + html: WELCOME_EMAIL }); return true; } catch (ex) { diff --git a/shared/services/email_templates/WelcomeEmail.ts b/shared/services/email_templates/WelcomeEmail.ts new file mode 100644 index 0000000..fc100c8 --- /dev/null +++ b/shared/services/email_templates/WelcomeEmail.ts @@ -0,0 +1,378 @@ +export const WELCOME_EMAIL = ` + + + + + + Welcome Email Litlyx + + + + + + + + + + + + +` \ No newline at end of file