PHPackages                             defectivecode/mjml - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. defectivecode/mjml

ActiveLaravel[Templating &amp; Views](/categories/templating)

defectivecode/mjml
==================

Compile MJML to responsive HTML emails directly in PHP without requiring Node.js. Wraps the official MJML engine with full Laravel integration.

2.0.0(3mo ago)440.7k↓16.8%[1 issues](https://github.com/DefectiveCode/mjml/issues)MITPHPPHP &gt;=8.4CI passing

Since Oct 2Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/DefectiveCode/mjml)[ Packagist](https://packagist.org/packages/defectivecode/mjml)[ RSS](/packages/defectivecode-mjml/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (5)Versions (14)Used By (0)

   ![Defective Code Logo](https://camo.githubusercontent.com/b908aa3ebd794a21c8deddfa90d3533345e96cbc561822799450ebd26aa0be71/68747470733a2f2f646566656374697665636f64652e636f6d2f6c6f676f732f6c6f676f2d616e696d617465642d6c696768742e706e67)

[English](https://www.defectivecode.com/packages/mjml/en) | [العربية](https://www.defectivecode.com/packages/mjml/ar) | [বাংলা](https://www.defectivecode.com/packages/mjml/bn) | [Bosanski](https://www.defectivecode.com/packages/mjml/bs) | [Deutsch](https://www.defectivecode.com/packages/mjml/de) | [Español](https://www.defectivecode.com/packages/mjml/es) | [Français](https://www.defectivecode.com/packages/mjml/fr) | [हिन्दी](https://www.defectivecode.com/packages/mjml/hi) | [Italiano](https://www.defectivecode.com/packages/mjml/it) | [日本語](https://www.defectivecode.com/packages/mjml/ja) | [한국어](https://www.defectivecode.com/packages/mjml/ko) | [मराठी](https://www.defectivecode.com/packages/mjml/mr) | [Português](https://www.defectivecode.com/packages/mjml/pt) | [Русский](https://www.defectivecode.com/packages/mjml/ru) | [Kiswahili](https://www.defectivecode.com/packages/mjml/sw) | [தமிழ்](https://www.defectivecode.com/packages/mjml/ta) | [తెలుగు](https://www.defectivecode.com/packages/mjml/te) | [Türkçe](https://www.defectivecode.com/packages/mjml/tr) | [اردو](https://www.defectivecode.com/packages/mjml/ur) | [Tiếng Việt](https://www.defectivecode.com/packages/mjml/vi) | [中文](https://www.defectivecode.com/packages/mjml/zh)

Introduction
============

[](#introduction)

[MJML](https://mjml.io/) is a markup language specifically designed to simplify the process of coding responsive emails. Its semantic syntax ensures ease and simplicity, while its extensive library of standard components accelerates development and reduces the complexity of your email codebase. The open-source engine of MJML generates high-quality, responsive HTML that adheres to best practices. If you've experienced the frustrations of working with Outlook, this package is tailored for you.

Our MJML implementation serves as a wrapper for the official MJML API. It enables convenient compilation of MJML into HTML directly within PHP, ***without the need for NodeJS***. This package is ideal for PHP applications that wish to incorporate MJML without the hassle of installing NodeJS and the MJML CLI.

Example
-------

[](#example)

```
// Without Laravel
(new MJML)->render(
    'Hello World'
);

// Minified HTML
(new MJML)->minify()->render(
    'Hello World'
);

// With Laravel
MJML::render(
    'Hello World'
);

// With Laravel and minified HTML
MJML::minify()->render(
    'Hello World'
);
```

Documentation
=============

[](#documentation)

You may read the [documentation on our website](https://www.defectivecode.com/packages/mjml/en).

License
=======

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance73

Regular maintenance activity

Popularity33

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 80.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~46 days

Total

9

Last Release

113d ago

Major Versions

1.1.5 → 2.0.02026-01-25

PHP version history (2 changes)1.0.0PHP &gt;=8.2

2.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/78e4224b766aee15b2ed1281e7ccca475fb48908887435c3504ffb2b9991c993?d=identicon)[SimplyCorey](/maintainers/SimplyCorey)

---

Top Contributors

[![SimplyCorey](https://avatars.githubusercontent.com/u/624784?v=4)](https://github.com/SimplyCorey "SimplyCorey (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/defectivecode-mjml/health.svg)

```
[![Health](https://phpackages.com/badges/defectivecode-mjml/health.svg)](https://phpackages.com/packages/defectivecode-mjml)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[konekt/html

HTML and Form Builders for the Laravel Framework

24403.2k5](/packages/konekt-html)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
