KXkonstantinos.xafis
Full-Stack & CloudflareMaintained2024

Automated-Mails-Byz

BunTypeScriptMailerSendTursolibSQL

Overview

The school needed dependable, personalized email throughout the academic year: registration reminders, admission notifications, AMKA collection requests, seminar announcements. This service makes those sends programmatic.

What I built

A POST service on Bun.serve, authenticated by a shared service token. It fetches HTML templates live from the school site, substitutes {{ placeholder }} tokens with typed payloads, and sends through the MailerSend SDK — from no-reply@musicschool-metamorfosi.gr under the school’s display name.

Recipient data is read from a Turso (libSQL) database; the entity types mirror the full school domain (students, registrations, books, payments, wholesalers). A library of Greek templates covers the school-year events, and a local development path swaps MailerSend for the Gmail API via OAuth2, logging every send to mail_log.txt.

Technical highlights

Outcome

Sends the school’s automated correspondence each season.