PHPackages                             synolia/sylius-mail-tester-plugin - 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. synolia/sylius-mail-tester-plugin

ActiveSylius-plugin[Mail &amp; Notifications](/categories/mail)

synolia/sylius-mail-tester-plugin
=================================

Mail Tester Plugin.

v3.0.0(1y ago)14149.3k↓61.5%7[1 issues](https://github.com/synolia/SyliusMailTesterPlugin/issues)[1 PRs](https://github.com/synolia/SyliusMailTesterPlugin/pulls)1MITPHPPHP ^8.2CI failing

Since Jan 27Pushed 4mo ago11 watchersCompare

[ Source](https://github.com/synolia/SyliusMailTesterPlugin)[ Packagist](https://packagist.org/packages/synolia/sylius-mail-tester-plugin)[ RSS](/packages/synolia-sylius-mail-tester-plugin/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (38)Versions (20)Used By (1)

[![License](https://camo.githubusercontent.com/a0096ab48e32cef286c13909a9f9e70da6193547b1e80fc900dd09e34578e9e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73796e6f6c69612f73796c6975732d6d61696c2d7465737465722d706c7567696e2e737667)](https://github.com/synolia/SyliusMailTesterPlugin/blob/main/LICENSE)[![CI - Analysis](https://github.com/synolia/SyliusMailTesterPlugin/actions/workflows/analysis.yaml/badge.svg?branch=main)](https://github.com/synolia/SyliusMailTesterPlugin/actions/workflows/analysis.yaml)[![CI - Sylius](https://github.com/synolia/SyliusMailTesterPlugin/actions/workflows/sylius.yaml/badge.svg?branch=main)](https://github.com/synolia/SyliusMailTesterPlugin/actions/workflows/sylius.yaml)[![Version](https://camo.githubusercontent.com/b107f939a4373d537fdf2c48ac4312e869bb169600ba976e011aea62b198c544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73796e6f6c69612f73796c6975732d6d61696c2d7465737465722d706c7567696e2e737667)](https://packagist.org/packages/synolia/sylius-mail-tester-plugin)[![Total Downloads](https://camo.githubusercontent.com/7e7ca7bed0524debca1ae773b5329987cd0472f17866cd285a372aa594a1fc8d/68747470733a2f2f706f7365722e707567782e6f72672f73796e6f6c69612f73796c6975732d6d61696c2d7465737465722d706c7567696e2f646f776e6c6f616473)](https://packagist.org/packages/synolia/sylius-mail-tester-plugin)

 [    ![Sylius Logo.](https://camo.githubusercontent.com/ea9dddc934264aa7ec01cf3202c500f3d8b04448bce2571bdc74230efddda88f/68747470733a2f2f6d656469612e73796c6975732e636f6d2f73796c6975732d6c6f676f2d3830302e706e67)  ](https://sylius.com)

Mail Tester Plugin
==================

[](#mail-tester-plugin)

Test how your emails are rendered by sending them to your email from your Sylius admin panel.

[![Capture](/etc/capture.png "Capture")](/etc/capture.png)[![SentEmail](/etc/capture-email.png "Sent Email")](/etc/capture-email.png)

Features
--------

[](#features)

- See a list of all sylius emails
- Send example email one by one to your email address
- Send all example emails to your email address
- For each email, you have to select the entity to be used in the template.

Requirements
------------

[](#requirements)

VersionPHP^8.2Sylius^2.0Installation
------------

[](#installation)

1. Add the bundle and dependencies in your composer.json :

    ```
    $ composer require synolia/sylius-mail-tester-plugin
    ```
2. Enable the plugin in your `config/bundles.php` file by add

    ```
    Synolia\SyliusMailTesterPlugin\SynoliaSyliusMailTesterPlugin::class => ['all' => true],
    ```
3. Create a new file `config/routes/mailtester.yaml` with:

    ```
    synolia_mail_tester:
        resource: "@SynoliaSyliusMailTesterPlugin/config/routes/admin_routing.yaml"
        prefix: '/%sylius_admin.path_name%'
    ```
4. Import the plugin configuration:

    ```
    # config/packages/mailtester.yaml
    imports:
        - { resource: "@SynoliaSyliusMailTesterPlugin/config/config.yaml" }
    ```

Usage
-----

[](#usage)

- Log into admin panel
- Click on `Mail tester` in the Configuration section in main menu
- Enter the email address that will receive the example email template
- Select the email you would like to be sent.
- Click on `Choose subject`
- Fill empty boxes and select your entities.
- Click the Submit button.

Allow sending your custom emails
--------------------------------

[](#allow-sending-your-custom-emails)

In order to be able to send a custom email with variables, you have to add a form type that will add those variables to the form. The important part is that your Form Type must implement ResolvableFormTypeInterface in order to be discovered by our FormTypeResolver.

```
