elgigi/mjml

PHP MJML library

1.1.1 2024-04-02 11:49 UTC

This package is auto-updated.

Last update: 2024-04-04 11:48:34 UTC


README

Latest Version Software License Build Status Codacy Grade Total Downloads

PHP library who use MJML node.js library to convert MJML language to HTML.

Installation

Composer

You can install the client with Composer, it's the recommended installation.

composer require elgigi/mjml
npm install mjml

Dependencies

  • PHP ^7.1 || ^8.0
  • NPM: mjml

Usage

$mjml = new Mjml(PATH_TO_MJML_NODE_COMMAND);
$output = $mjml->strToHtml('MY MJML CODE');

Options

You can minify the output (default: yes).

$mjml->minify(false); // To disable minify option
$mjml->minify(true); // To enable minify option