PHPackages                             fusonic/messenger-mailer-bundle - 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. fusonic/messenger-mailer-bundle

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

fusonic/messenger-mailer-bundle
===============================

Symfony bundle for asynchronous e-mails with attachments through Symfony Messenger.

2.4.0(5mo ago)648.4k↓18%[1 issues](https://github.com/fusonic/php-messenger-mailer-bundle/issues)MITPHPPHP &gt;=8.2

Since Jun 21Pushed 5mo ago7 watchersCompare

[ Source](https://github.com/fusonic/php-messenger-mailer-bundle)[ Packagist](https://packagist.org/packages/fusonic/messenger-mailer-bundle)[ RSS](/packages/fusonic-messenger-mailer-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (20)Versions (18)Used By (0)

messenger-mailer-bundle
=======================

[](#messenger-mailer-bundle)

[![License](https://camo.githubusercontent.com/23a5d4725acb2556f8769e4269cd2e768153791d8312d1c07c009a57eae48f56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6675736f6e69632f6d657373656e6765722d6d61696c65722d62756e646c653f636f6c6f723d626c7565)](https://github.com/fusonic/php-messenger-mailer-bundle/blob/master/LICENSE)[![Latest Version](https://camo.githubusercontent.com/26b5ca950cdc353c4bbe875cae78f90fbf79bd858856ee91e254d11d4cb75f37/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6675736f6e69632f7068702d6d657373656e6765722d6d61696c65722d62756e646c652e7376673f636f6c6f723d626c7565)](https://github.com/fusonic/php-messenger-mailer-bundle/releases)[![Total Downloads](https://camo.githubusercontent.com/bfff05700cf11eda78eb01cc8f5be7941d10e94d52596e395abcba4d0c734012/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6675736f6e69632f6d657373656e6765722d6d61696c65722d62756e646c652e7376673f636f6c6f723d626c7565)](https://packagist.org/packages/fusonic/messenger-mailer-bundle)[![php 8.2+](https://camo.githubusercontent.com/84bd92a1758108a8ea826ec995a24da8fb51bfe1ce4d11f38ea5667da42d69dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d6d696e253230382e312d626c75652e737667)](https://camo.githubusercontent.com/84bd92a1758108a8ea826ec995a24da8fb51bfe1ce4d11f38ea5667da42d69dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d6d696e253230382e312d626c75652e737667)

- [About](#about)
- [Install](#install)
- [Usage](#usage)
- [Contributing](#contributing)

About
-----

[](#about)

You might need to bundle if your project fulfills the following criteria:

- You are using **Symfony Mailer** with **Symfony Messenger**.
- Your message queue containing the Mailer messages is running asynchronously.
- Your email contains **attachments**.

This bundle solves the following problems that can occur:

- If you use `Symfony\Component\Mime\Email::attach` the message will contain the entire file. Using blob data inside the message transport is not recommended and can lead to problems.
- If you use `Symfony\Component\Mime\Email::attachFromPath`, the path might not exist at the moment of handling the message (depending on your implementation). An example is when you are generating a temporary file (such as a PDF) and want to attach it to the e-mail. If this is a temporary file it might get deleted before the message is handled.

Install
-------

[](#install)

Use composer to install the bundle from packagist.

```
composer require fusonic/messenger-mailer-bundle
```

Requirements:

- PHP 8.2+
- Symfony 6.2+

In case Symfony did not add the bundle to the bundle configuration, add the following (by default located in `config/bundles.php`):

```
