Skip to content

foundation/inky-example-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inky Example: Node.js

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:

npm run send

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

About

Example: Using Inky email framework with node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors