import nodemailer from 'nodemailer'; import { requireEnv } from '../utilts/requireEnv'; const transport = nodemailer.createTransport({ service: requireEnv('EMAIL_SERVICE'), host: requireEnv('EMAIL_HOST'), auth: { user: requireEnv('EMAIL_USER'), pass: requireEnv('EMAIL_PASS') } }); 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!
` 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!
` export async function sendLimitEmail50(target: string) { try { await 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; } } export async function sendWelcomeEmail(target: string) { try { await transport.sendMail({ from: 'helplitlyx@gmail.com', to: target, subject: 'Welcome to Litlyx', html: TemplateEmailWelcome }); return true; } catch (ex) { console.error('ERROR SENDING EMAIL', ex); return false; } }