Weave Code
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
Mailgun Mailer

Mailgun Mailer Laravel Package

symfony/mailgun-mailer

Symfony Mailer integration for Mailgun. Send emails via Mailgun using SMTP, HTTP, or API transports by setting MAILER_DSN with your Mailgun key, domain, and optional region. Suitable for Symfony apps needing reliable Mailgun delivery.

View on GitHub
Deep Wiki
Context7

Symfony Mailgun Mailer Bridge

Frequently asked questions about Mailgun Mailer
Can I use symfony/mailgun-mailer in Laravel 10+ without breaking existing mail functionality?
No, this package requires Symfony Mailer v7.4+/8.0+, while Laravel 10+ uses symfony/mailer v6.4.x. The version mismatch causes runtime failures, incompatible event systems, and breaks Laravel’s native mail facade. Avoid this package for Laravel projects.
How does symfony/mailgun-mailer compare to Laravel’s built-in Mailgun driver (MAIL_MAILER=mailgun)?
Laravel’s native driver is optimized for Laravel’s architecture, supports queues (Horizon), and integrates with notifications. This package adds unnecessary complexity, redundant SDK layers, and conflicts with Laravel’s HTTP client (e.g., HTTP/2 vs. HTTP/1.1 enforcement). Stick with Laravel’s driver.
Will this package work with Laravel’s queue system (e.g., Horizon) for delayed emails?
No, this package lacks Laravel-specific queue integration. Laravel’s mail facade is tightly coupled with its queue system, and replacing it would break existing queue jobs, notifications, or Horizon monitoring. Use Laravel’s native Mailgun driver instead.
Does symfony/mailgun-mailer support Laravel’s mail events (e.g., Sent, Failed) out of the box?
No, this package uses Symfony’s event system, which is incompatible with Laravel’s mail events. You’d need custom adapters to bridge the gap, adding complexity and potential debugging headaches. Laravel’s native driver handles events natively.
What are the performance implications of using this package in Laravel?
This package enforces HTTP/1.1 for Mailgun API requests, which may conflict with Laravel’s default HTTP client (e.g., Guzzle’s HTTP/2 or connection pooling). This could degrade performance or cause timeouts. Laravel’s native driver avoids these conflicts.
How do I configure symfony/mailgun-mailer in Laravel’s .env file?
This package requires a DSN string (e.g., `mailgun+api://KEY:DOMAIN@default?region=REGION`), but Laravel’s .env uses `MAIL_MAILER=mailgun` + `MAILGUN_DOMAIN`/`MAILGUN_KEY`. Dual configurations would cause errors, and no migration path exists. Laravel’s native setup is simpler and more maintainable.
Are there any Laravel-specific features this package adds that aren’t available in Laravel’s native Mailgun driver?
No, this package is a Symfony-centric wrapper with no Laravel-specific features. Laravel’s native driver already includes queue support, notifications, and event handling—features this package lacks. Avoid it for Laravel projects.
Will this package work with Laravel’s notifications system (e.g., Notifiable contracts)?
No, this package doesn’t integrate with Laravel’s notifications system. Notifications rely on Laravel’s mail facade and queue system, which this package replaces incompatibly. Use Laravel’s native Mailgun driver for full notifications support.
How do I debug issues if I accidentally use this package in Laravel?
Debugging will be difficult due to mixed Symfony/Laravel stack traces and incompatible event systems. Laravel’s native driver provides clear error messages and integrates with Laravel’s debugging tools. Avoid this package to prevent integration headaches.
Is there a way to migrate from symfony/mailgun-mailer to Laravel’s native Mailgun driver?
No, there’s no official migration path. The two packages use entirely different configurations, event systems, and dependency structures. Start fresh with Laravel’s native driver (`MAIL_MAILER=mailgun`) instead of attempting a migration.
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.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony