maizzle
maizzle copied to clipboard
Example for rendering beautiful emails with dynamic content using TailwindCSS
Rendering Emails with Maizzle
Example for rendering beautiful emails with dynamic content using TailwindCSS
Features
- Build beautiful emails using TailwindCSS
- Add dynamic content to emails
- Render and send emails from Node.js
Tech Stack
Usage
Recommended OS: Linux
Requirements: Node.js
Setup
-
npm install
(Install NPM dependencies) - Set
MAILJET_PUBLIC_KEY
andMAILJET_PRIVATE_KEY
in.env
(Mailjet)
Commands
-
npm run dev
(Start local development) -
npx ts-node-dev server.ts
(Start mail rendering server, http://localhost:8080)- Render and show email example: http://localhost:8080?name=Flo?&url=https://youtube.com/@flolu
- Render and send email example: http://localhost:8080/send/[email protected]?name=Flo&url=https://youtube.com/@flolu
Codebase
-
src
(Maizzle email templates) -
server.ts
(Node.js server to render and send the emails)