frosh/mjml

Compiles MJML email templates to HTML for Shopware mail sending

Maintainers

Package info

github.com/FriendsOfShopware/FroshMjml

Type:shopware-platform-plugin

pkg:composer/frosh/mjml

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

dev-main 2026-06-09 13:05 UTC

This package is auto-updated.

Last update: 2026-06-09 13:51:07 UTC


README

⚠️ Work in progress — this plugin is still under active development and not yet production-ready. Expect breaking changes.

MJML email templates for Shopware 6.7. MJML in a mail's HTML body is compiled to responsive HTML at send time — pure PHP (shyim/mjml-php), no Node required.

Requirements

  • Shopware ~6.7.0
  • PHP 8.2+

Installation

composer require frosh/mjml
bin/console plugin:refresh
bin/console plugin:install --activate FroshMjml

Usage

Per mail template: open a mail template, toggle Use MJML, and write MJML in the editor. The default HTML stays untouched, so the toggle is reversible.

Reusable components (Settings → MJML Components) are referenced from Twig:

  • {{ mjml_component('name', { headline: '…' }) }} — inline fragment
  • {% mjml 'name' %}…{% endmjml %} — fragment with a {{ content }} slot
  • {% extends mjml_base('name') %}{% block content %}…{% endblock %} — base layout

Content inside a block or slot must be valid MJML (<mj-text>…</mj-text> etc.); raw text in an <mj-column> is dropped by MJML.