MJML to HTML via CLI

Render Processwire MJML templates to converted HTML output using a CLI based compiler, like the rust based MRML.

MJML to HTML via CLI module

Module for ProcessWire CMS
Copyright (c) 2026 Commonwealth of Australia

Convert MJML templates to HTML using a CLI compiler like the MRML rust compiler.

This is based off the popular MJML to HTML module by ERPC Studio, but is intended to be a self contained replacement and does not rely on calling the MJML API.

This module is best used in conjuction with the ProMailer module for easy sending of emails directly from ProcessWire.

Requirements


Installing


This module is installed just like any other ProcessWire module: copy or clone the directory containing this module to your /site/modules/ directory, log in, go to Admin > Modules, click "Check for new modules", and install "MJML to HTML via CLI".

Configuration


Path to CLI

Input the path on disk to your intended MJML compiler. We recommend the MRML rust compiler, as it is very fast. After saving, the module will then check the provided path can validate a test MJML file successfully - providing an error if not.

Choose which templates to render

Choose the template(s) which output MJML and should be converted to HTML at render time.

Error message shown to editors

Allows you to specify an error message which is shown to non-superuser editors when they attempt to view the page when an error occurs. Commonly used to suggest the editor contact a superuser or developer for support.

Using this module


Render MJML from template

Once you have installed the module, and configured it to render your selected templates, then you should just be able to view the selected templates and they will render as HTML.

This module is intended for use with the ProMailer module for easy sending of emails directly from ProcessWire.

Rendering MJML from a string

You can also render MJML to HTML wherever needed using $module->renderMJMLString(string $mjml)

$mjml = "<mjml></mjml>"; // MJML content as a string

/** @var PageMjmlToHtmlViaCli $pageToMjml */
$mjmlToHtml = $modules->get("PageMjmlToHtmlViaCli");

$result = $mjmlToHtml->renderMJMLString($mjml);
echo $result;

More modules by Australian Antarctic Division

  • MJML to HTML via CLI

    Render Processwire MJML templates to converted HTML output using a CLI based compiler, like the rust based MRML.
  • Replace Microsoft Protected Links

    Replace protected links from Outlook/Teams/Microsoft Office with the original link.

All modules by Australian Antarctic Division

Install and use modules at your own risk. Always have a site and database backup before installing new modules.