GitHub - foundation/inky-example-node: Example: Using Inky email framework with node

A minimal example showing how to use the Inky email framework from Node.js via the inky-wasm package.

Requires Inky v2. See installation instructions.

Quick Start

npm install
npm run build

File Structure

src/emails/welcome.inky    Source template
data/welcome.json           Sample merge data
dist/                       Built output (generated)
build.js                    Build script
send.js                     Email sending example

Building

npm run build transforms the Inky template into email-safe HTML with CSS inlined, generates a merged version with sample data, and creates a plain text version.

Sending

Edit send.js with your SMTP credentials, then:

The example uses nodemailer. Install it with npm install nodemailer.

Customizing

  • Edit src/emails/welcome.inky to change the template
  • Edit data/welcome.json to change merge data
  • Add more templates and data files as needed

Documentation