A minimal example showing how to use the Inky email framework from PHP via the FFI bindings.
Requires Inky v2. See installation instructions.
- PHP >= 8.1 with FFI extension enabled
- The
libinkyshared library (build from source:cargo build -p inky-ffi --release)
composer install
php build.phpsrc/emails/welcome.inky Source template
data/welcome.json Sample merge data
dist/ Built output (generated)
build.php Build script
send.php Email sending example
php build.php transforms the Inky template, generates a merged version with sample data, and creates a plain text version.
Edit send.php with your SMTP credentials, then:
php send.phpThe example uses PHPMailer. Install it with composer require phpmailer/phpmailer.