New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

webnuvola/laravel-mjml

Effortlessly craft responsive email templates using MJML within Laravel Mailables
7,138 2
Install
composer require webnuvola/laravel-mjml
Latest Version:v1.1.0
PHP:^8.3
Laravel:10 – 13
Older releases:9
License:MIT
Last Updated:Oct 7, 2026
Links: GitHub  ·  Packagist
Maintainer: fab120

Laravel MJML

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Effortlessly craft responsive email templates using MJML within Laravel Mailables.

To use this package, follow these steps after generating a new Mailable.
Instead of extending Illuminate\Mail\Mailable, extend Webnuvola\Laravel\Mjml\Mailable.
In the Mailable class, define the build method.
You can now use the mjml method for defining a view or mjmlContent to directly pass the MJML template.

Here's an example:

use Webnuvola\Laravel\Mjml\Mailable;

class TestMail extends Mailable
{
    /**
     * Build the message.
     */
    public function build(): void
    {
        $this->mjml('emails.orders.shipped', [
            'order' => $order,
        ]);
    }
}

Installation

You can install the package via composer:

composer require webnuvola/laravel-mjml

In your project, or on your server, you must have the JavaScript package mjml installed.

npm install mjml

Make sure you have installed Node 16 or higher.
This package uses spatie/mjml-php under the hood.

Testing

composer test

Credits

Inspired by asahasrabuddhe/laravel-mjml package.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

harlan-zw/laravel-modern-mail

Extends the Laravel mail experience.

5,363 3
sendkit/sendkit-laravel

SendKit integration for Laravel

11,997 6
felrov/laravel-mandrill

Laravel Mandrill Mail Transport

5,550 0
bpedroza/laravel-mail-assertions

Make assertions on mail in laravel.

4,257 3
rulr/laravel-mailpot

A local mail inbox for Laravel

3,292 16

Version History

Version Released PHP Laravel License
v1.1.0 ^8.3 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
v1.0.1 ^8.1 ^9.0||^10.0||^11.0 MIT
v1.0.0 ^8.1 ^9.0||^10.0||^11.0 MIT
v0.4.0
0.3.1