Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Mailer Bundle

Mailer Bundle Laravel Package

symkit/mailer-bundle

Symkit Mailer Bundle streamlines email sending in Symfony apps with configurable transports, reusable message templates, and a clean service-based API. Install via Composer, configure your mailer, and send transactional or notification emails with minimal setup.

View on GitHub
Deep Wiki
Context7

A Symfony bundle to manage and send emails from MJML-based templates, with event-driven logging and optional asynchronous sending via Symfony Messenger.

Frequently asked questions about Mailer Bundle
How do I install symkit/mailer-bundle with Composer?
Install it with composer require symkit/mailer-bundle. Then register the bundle in your config/bundles.php if your application does not use Symfony Flex auto-registration. Finally, publish or create a configuration file under config/packages so the mailer services and transports are wired into the container.
Does symkit/mailer-bundle work with Laravel?
No. This package is a Symfony bundle built on top of Symfony Mailer and the Symfony dependency injection container, so it depends on Symfony services, bundles, and configuration conventions. Laravel applications should use Laravel's own Mail facade or a Laravel-specific Composer package instead. If you are porting concepts rather than code, the template-based message composition idea translates easily, but the bundle itself will not boot outside Symfony.
Which Symfony and PHP versions are supported?
Supported versions are declared in the package's composer.json constraints, so run composer show symkit/mailer-bundle to see the exact PHP and symfony/mailer requirements for the release you plan to use. Because the bundle wraps Symfony Mailer and Twig, you need compatible versions of those components installed. Check the constraint output before upgrading Symfony to avoid a dependency conflict.
How do I configure multiple transports such as SMTP and an API provider?
Configure your transports in the bundle configuration using DSN strings, the same way Symfony Mailer defines them. You can register several transports and select which one a given mailer service uses, so marketing notifications can go through one provider while transactional receipts go through another. Keep the DSNs in environment variables so each environment can point at a different transport without code changes.
How do I send a transactional email from a Twig template?
Inject the bundle's mailer service into your controller or application service and compose a message that references a Twig template plus a context array. The bundle renders the template with that context and dispatches the resulting message through the configured transport. This keeps the HTML body in your templates directory instead of inline PHP strings, and the context array is the only thing your sending code has to build.
Can I test email sending without delivering real messages?
Yes. The bundle is designed to be test-friendly and relies on Symfony DI, so you can swap in a null or test transport in your test environment. In functional tests you can inspect the collected messages and assert on recipients, subject, and rendered template content instead of sending anything. Use environment-aware configuration so the test transport is selected automatically when the test kernel boots.
Do I still need to configure Symfony Mailer separately?
Yes, to a degree. The bundle wraps Symfony Mailer rather than replacing it, so the underlying mailer and transport configuration, including DSN and sender addresses, still has to be valid. Think of the bundle as a service and templating layer on top of Symfony Mailer: it removes boilerplate from your application code but does not remove Symfony Mailer from your dependency tree.
How should I handle mailer configuration across development, staging, and production?
Keep transport DSNs, sender addresses, and any provider credentials in environment variables and reference them from your bundle configuration. That lets development use a debug or null transport while staging and production use the real provider, with no code differences. Because the configuration is environment-aware, you can also disable actual delivery in local and CI environments to avoid accidentally emailing real users.
Should I use this bundle or just use Symfony Mailer directly?
Plain Symfony Mailer is perfectly capable of sending email on its own, so the bundle earns its place only if you want reusable, preconfigured mailer services and template-based composition. If your application scatters the same message-building boilerplate across many services, wrapping it in configurable services can reduce duplication. If you only send one or two simple emails, the extra abstraction may not be worth the added dependency.
How is symkit/mailer-bundle maintained and how do I report a bug?
The source lives at github.com/symkit/mailer-bundle, which is also where issues and pull requests are handled. Open an issue with your Symfony, PHP, and bundle versions plus a minimal reproduction so the problem can be triaged quickly. Releases are distributed through Composer, so pinning to a caret constraint and reviewing the changelog before upgrading is the safest maintenance approach.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console