mjml-php
PHP package that converts MJML email markup to HTML.
mjml-php is a PHP package that converts MJML, a markup language for responsive email, into HTML. It is installed with Composer and called from PHP code: toHtml() returns the converted HTML, and convert() also returns the errors MJML reports for the input. The conversion depends on the JavaScript mjml package, which must be installed on the server next to a Node.js executable. The package finds that executable itself, and an environment variable sets its path when it cannot.
Worth knowing
The conversion needs Node.js on the machine that runs PHP. For Laravel projects the README describes a separate route through Sidecar, which deploys the conversion as a Lambda function instead.
Sources
- 2026-11-16: links, Written in, License, GitHub stars
api.github.com/repos/spatie/mjml-php - 2026-11-16: Maintainer, Headquarters
spatie.be/disclaimer - 2026-11-16: First release
api.github.com/repos/spatie/mjml-php/releases?per_page=100 - 2026-11-16: Runtime, Minimum runtime
github.com/spatie/mjml-php/blob/1.3.0/composer.json - 2026-11-16: Runtime, Categories, Install with
github.com/spatie/mjml-php/blob/main/README.md - 2026-11-16: Packagist downloads
packagist.org/packages/spatie/mjml-php.json - 2026-11-16: License model
github.com/spatie/mjml-php/blob/main/LICENSE.md - 2026-11-16: Contributors
api.github.com/repos/spatie/mjml-php/contributors?per_page=1 - 2026-11-16: Current major version, Last release
github.com/spatie/mjml-php/releases/tag/1.3.0