PHPackages                             spatie/mjml-sidecar - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. spatie/mjml-sidecar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

spatie/mjml-sidecar
===================

Compile MJML to HTML using Sidecar

1.1.1(11mo ago)1359.5k↓55%4MITPHPPHP ^8.1CI passing

Since Aug 23Pushed 1w ago1 watchersCompare

[ Source](https://github.com/spatie/mjml-sidecar)[ Packagist](https://packagist.org/packages/spatie/mjml-sidecar)[ Docs](https://github.com/spatie/mjml-sidecar)[ RSS](/packages/spatie-mjml-sidecar/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (5)Dependencies (15)Versions (10)Used By (0)

Compile MJML to HTML using Sidecar
==================================

[](#compile-mjml-to-html-using-sidecar)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d22b10429f4dfaf02d423bc5dc4588576d808a08e5e9f0f2b824c7ad0434cb84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6d6a6d6c2d736964656361722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/mjml-sidecar)[![GitHub Tests Action Status](https://github.com/spatie/mjml-sidecar/actions/workflows/run-tests.yml/badge.svg)](https://github.com/spatie/mjml-sidecar/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://github.com/spatie/mjml-sidecar/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/spatie/mjml-sidecar/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/99f1da9f73d54096bf4ab237148698397710a2384fd280df6c0f0c8516973108/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6d6a6d6c2d736964656361722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/mjml-sidecar)

This is a companion package to [mjml-php](https://github.com/spatie/mjml-php) that runs compilation through [Sidecar](https://hammerstone.dev/sidecar) instead.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/e7b68a3a799da6f68abadf177a247fe1a8ab136c4faf1ed5f47db205ccae16df/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6d6a6d6c2d736964656361722e6a70673f743d31)](https://spatie.be/github-ad-click/mjml-sidecar)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require spatie/mjml-sidecar
```

Register the `MjmlFunction` in your `sidecar.php` config file.

```
/*
 * All of your function classes that you'd like to deploy go here.
 */
'functions' => [
    \Spatie\MjmlSidecar\MjmlFunction::class,
],
```

Deploy the Lambda function by running:

```
php artisan sidecar:deploy --activate
```

See the [Sidecar documentation](https://hammerstone.dev/sidecar/docs/main/functions/deploying) for details.

Usage
-----

[](#usage)

For usage, check the [mjml-php](https://github.com/spatie/mjml-php) documentation.

All the methods are available, just make sure to add `->sidecar()`, for example:

```
Mjml::new()->sidecar()->toHtml($mjml);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Rias Van der Veken](https://github.com/spatie)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance77

Regular maintenance activity

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~172 days

Total

5

Last Release

355d ago

Major Versions

0.0.1 → 1.0.02023-08-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (17 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (13 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (6 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (2 commits)")[![danielboendergaard](https://avatars.githubusercontent.com/u/314877?v=4)](https://github.com/danielboendergaard "danielboendergaard (1 commits)")

---

Tags

mailsmjmlsidecarspatielaravelmjml-sidecar

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[spatie/laravel-data

Create unified resources and data transfer objects

1.8k35.2M974](/packages/spatie-laravel-data)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[wnx/sidecar-browsershot

A Sidecar function to run Browsershot on Lambda.

2351.8M10](/packages/wnx-sidecar-browsershot)

PHPackages © 2026

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