PHPackages                             spectate/laravel-react-email - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. spectate/laravel-react-email

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

spectate/laravel-react-email
============================

Build Laravel mailables with react-email.

0.1.4(1y ago)3233[10 PRs](https://github.com/spectate/laravel-react-email/pulls)MITPHPPHP ^8.2CI passing

Since Oct 9Pushed 1mo agoCompare

[ Source](https://github.com/spectate/laravel-react-email)[ Packagist](https://packagist.org/packages/spectate/laravel-react-email)[ Docs](https://github.com/spectate/laravel-react-email)[ GitHub Sponsors](https://github.com/Spectate)[ RSS](/packages/spectate-laravel-react-email/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (13)Versions (19)Used By (0)

Build Laravel mailables with react-email.
=========================================

[](#build-laravel-mailables-with-react-email)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4a288d354c228a79a9041d90dda4a18130adabf380bf7ac8fae0559b8ca5f3d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73706563746174652f6c61726176656c2d72656163742d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spectate/laravel-react-email)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c194f631ad07368be8ab4e6cb1bef163bc2cb7b9169adaee00d01391db65bf59/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73706563746174652f6c61726176656c2d72656163742d656d61696c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/spectate/laravel-react-email/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a1151c099aec1b9c15cce5f41f7025da1771f5d8ac838da035afd5310625ce77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73706563746174652f6c61726176656c2d72656163742d656d61696c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/spectate/laravel-react-email/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8a3ea1bd546923e4ef3cef22b1d40767f8bbea509f1a6498b4523f6f25ed7eda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73706563746174652f6c61726176656c2d72656163742d656d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spectate/laravel-react-email)

Build Laravel mailables with [react.email](https://react.email/).

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

[](#installation)

You can install the package via composer:

```
composer require spectate/laravel-react-email
```

Next up, install the required NPM packages:

```
npm i -D typescript react react-email @react-email/components @react-email/render @types/react @types/node
```

You can publish the config file with:

```
php artisan vendor:publish --tag="react-email-config"
```

### Optional: Build templates on composer install

[](#optional-build-templates-on-composer-install)

If you run `composer install` during deployments, this way you will automatically regenerate the React Email templates on each deploy.

To enable this, add the following to your `composer.json` file:

```
{
    "post-install-cmd": [
        "@php artisan react-email:build"
    ]
}
```

Usage
-----

[](#usage)

Create your first React Email template:

```
php artisan make:react-email MyFirstEmail
```

### Optional: run the React Email dev server

[](#optional-run-the-react-email-dev-server)

You can run the React Email dev server to preview your templates:

```
php artisan react-email:dev
```

This will start the dev server and watch for changes in your templates.

Next up, edit the files in `resources/views/react-emails` and see the changes in your browser.

### Using variables

[](#using-variables)

To support variables in the compiled Blade templates, you can use the following syntax in your React Email templates:

```
export default function MyEmail() {
    return (

            Hello, $$name$$!

    );
}
```

This will be compiled to the following Blade template:

```
Hello, {{ $name }}!
```

### Hot reloading

[](#hot-reloading)

By default, on local development environments, the React Email templates are rendered on-the-fly for every send. This can be disabled by setting the `REACT_EMAIL_HOT_RELOAD` environment variable to `false`.

### Building templates

[](#building-templates)

You can build the React Email templates to HTML using the `react-email:build` command:

```
php artisan react-email:build
```

This will build all the templates and output them to `resources/views/vendor/react-email`.

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)

- [Bjarn Bronsveld](https://github.com/14638441+bjarn)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance66

Regular maintenance activity

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Total

5

Last Release

583d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b21c7b0783f49d47252342dde1bf0395079db0e423f0ee79e82620202355ab2?d=identicon)[bjarn](/maintainers/bjarn)

---

Top Contributors

[![bjarn](https://avatars.githubusercontent.com/u/14638441?v=4)](https://github.com/bjarn "bjarn (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")

---

Tags

laravelreact-emaillaravelSpectatelaravel-react-email

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/spectate-laravel-react-email/health.svg)

```
[![Health](https://phpackages.com/badges/spectate-laravel-react-email/health.svg)](https://phpackages.com/packages/spectate-laravel-react-email)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[xammie/mailbook

Laravel Mail Explorer

482458.3k1](/packages/xammie-mailbook)[spatie/laravel-notification-log

Log notifications sent by your Laravel app

207902.8k](/packages/spatie-laravel-notification-log)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[spatie/laravel-discord-alerts

Send a message to Discord

151408.0k](/packages/spatie-laravel-discord-alerts)[backstage/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24157.5k5](/packages/backstage-laravel-mails)

PHPackages © 2026

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