Download the PHP package mperonnet/symfony-react-email without Composer
On this page you can find all versions of the php package mperonnet/symfony-react-email. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mperonnet/symfony-react-email
More information about mperonnet/symfony-react-email
Files in mperonnet/symfony-react-email
Package symfony-react-email
Short Description React email for Symfony
License MIT
Homepage https://github.com/mperonnet/symfony-react-email
Informations about the package symfony-react-email
React Email for Symfony
Easily render React Email templates with Symfony using this bundle.
This package is a Symfony adaptation of laravel-react-email by Jamie Schouten.
Installation
First, install the bundle via Composer:
Then, install the required Node dependencies:
Register the bundle in your config/bundles.php
:
Configuration
Create a configuration file at config/packages/react_email.yaml
:
Getting Started
- Install React Email using the automatic or manual setup.
- Create an email component in the configured
template_directory
(e.g.,emails/new-user.tsx
). Ensure the component is the default export.
Example email component:
- Use the
ReactEmailRenderer
service to render your email templates:
ReactEmailContent Structure
The ReactEmailRenderer::render()
method returns a ReactEmailContent
object with the following properties:
Advanced Usage
Direct Integration with Symfony Mailer
The example below shows how to use the renderer with Symfony Mailer:
Use with Symfony Messenger
You can also use this with Symfony Messenger for asynchronous email sending:
Running Tests
Run tests using PEST:
Security
If you discover any security-related issues, please email the author instead of using the issue tracker.
License
This bundle is open-source and licensed under the MIT License. See the LICENSE file for details.
All versions of symfony-react-email with dependencies
symfony/http-kernel Version ^5.4|^6.0|^7.0
symfony/dependency-injection Version ^5.4|^6.0|^7.0
symfony/config Version ^5.4|^6.0|^7.0
symfony/process Version ^5.4|^6.0|^7.0
symfony/mailer Version ^5.4|^6.0|^7.0