PHP library who use MJML node.js library to convert MJML language to HTML.
You can install the client with Composer, it's the recommended installation.
$ composer require elgigi/mjml
$ npm install mjml
- PHP >= 7.1
- NPM: mjml
$mjml = new Mjml(PATH_TO_MJML_NODE_COMMAND);
$output = $mjml->strToHtml('MY MJML CODE');
You can minify the output (default: yes).
$mjml->minify(false); // To disable minify option
$mjml->minify(true); // To enable minify option