Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

foundation/inky-example-php

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inky Example: PHP

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

Requires Inky v2. See installation instructions.

Prerequisites

  • PHP >= 8.1 with FFI extension enabled
  • The libinky shared library (build from source: cargo build -p inky-ffi --release)

Quick Start

composer install
php build.php

File Structure

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

Building

php build.php transforms the Inky template, generates a merged version with sample data, and creates a plain text version.

Sending

Edit send.php with your SMTP credentials, then:

php send.php

The example uses PHPMailer. Install it with composer require phpmailer/phpmailer.

Documentation

About

Example: Using Inky email framework with php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.