Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.26 KB

File metadata and controls

46 lines (30 loc) · 1.26 KB

Inky Example: Go

A minimal example showing how to use the Inky email framework from Go via the Go bindings.

Requires Inky v2. See installation instructions.

Prerequisites

  • Go >= 1.21
  • The libinky shared library (build from source: cargo build -p inky-ffi --release)

Quick Start

go run cmd/build/main.go

File Structure

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

Building

go run cmd/build/main.go transforms the Inky template, generates a merged version with sample data, and creates a plain text version.

Sending

Edit cmd/send/main.go with your SMTP credentials, then:

go run cmd/send/main.go

Uses Go's built-in net/smtp. See comments for ESP alternatives.

Documentation