elgigi/mjml

PHP MJML library

Maintainers

Package info

github.com/ElGigi/mjml

pkg:composer/elgigi/mjml

Statistics

Installs: 4 562

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.1 2024-04-02 11:49 UTC

This package is auto-updated.

Last update: 2026-02-25 15:22:19 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