An open API service indexing awesome lists of open source software.

https://github.com/flolu/maizzle

Example for rendering beautiful emails with dynamic content using TailwindCSS
https://github.com/flolu/maizzle

emails maizzle nodejs posthtml tailwindcss typescript

Last synced: 6 months ago
JSON representation

Example for rendering beautiful emails with dynamic content using TailwindCSS

Awesome Lists containing this project

README

          


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

- [Maizzle](https://maizzle.com)
- [TailwindCSS](https://tailwindcss.com)
- [PostHTML](https://posthtml.org)
- [Node.js](https://nodejs.org)
- [TypeScript](https://www.typescriptlang.org)

# Usage

**Recommended OS**: Linux

**Requirements**: Node.js

**Setup**

- `npm install` (Install NPM dependencies)
- Set `MAILJET_PUBLIC_KEY` and `MAILJET_PRIVATE_KEY` in [`.env`](`.env`) ([Mailjet](https://www.mailjet.com))

**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/flo@drakery.com?name=Flo&url=https://youtube.com/@flolu

# Codebase

- [`src`](src) (Maizzle email templates)
- [`server.ts`](server.ts) (Node.js server to render and send the emails)