import nodemailer from 'nodemailer'; import type SMTPTransport from 'nodemailer/lib/smtp-transport'; import { WELCOME_EMAIL } from './email_templates/WelcomeEmail'; const TemplateEmail50 = ` LitLyx Limit Reached Email

⚠ Limit for project ⚠

Hey there! We found that one of your projects is at 50% of the limit of the plan. In order to continue to log visits & events, you should upgrade the plan of your project!

How can I upgrade the plan?

We offer different plans, each of them follows the stage of your project, so based on the reach, you should upgrade to the most appropriate one for your web platform. It takes 1 minute to upgrade the plan! You can find everything in the "Billing" section in the left menu of your dashboard.

Visit your dashboard

We are in early phases!

Want to become 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!
` class EmailService { private transport: nodemailer.Transporter; createTransport(service: string, host: string, user: string, pass: string) { this.transport = nodemailer.createTransport({ host, secure: true, auth: { user, pass }, tls: { minVersion: 'TLSv1', ciphers: 'HIGH:MEDIUM:!aNULL:!eNULL:@STRENGTH:!DH:!kEDH' } }); } async sendLimitEmail50(target: string) { try { if (!this.transport) return console.error('Transport not created'); await this.transport.sendMail({ from: 'helplitlyx@gmail.com', to: target, subject: 'Project limit 50%', html: TemplateEmail50 }); return true; } catch (ex) { console.error('ERROR SENDING EMAIL', ex); return false; } } async sendWelcomeEmail(target: string) { try { if (!this.transport) return console.error('Transport not created'); await this.transport.sendMail({ from: 'helplitlyx@gmail.com', to: target, subject: 'Welcome to Litlyx', html: WELCOME_EMAIL }); return true; } catch (ex) { console.error('ERROR SENDING EMAIL', ex); return false; } } } const instance = new EmailService(); export default instance;