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
Swiftmailer Send Grid Bundle

Swiftmailer Send Grid Bundle Laravel Package

expertcoder/swiftmailer-send-grid-bundle

Symfony bundle that adds a SendGrid transport for SwiftMailer, letting you send mail through SendGrid's PHP library. Configure your API key and optional categories, then set the swiftmailer transport to expertcoder_swift_mailer.send_grid. Works with Symfony Flex and older applications.

View on GitHub
Deep Wiki
Context7

Swiftmailer Transport and Symfony bundle for Sendgrid

Frequently asked questions about Swiftmailer Send Grid Bundle
Is expertcoder/swiftmailer-send-grid-bundle a Laravel package?
No. It is a Symfony bundle that registers a SwiftMailer transport for SendGrid, so it relies on Symfony's bundle kernel, swiftmailer.yaml configuration, and the SwiftMailer library. Laravel has no bundle kernel and Laravel 9+ no longer ships SwiftMailer, so the package's integration surface does not exist in a modern Laravel app.
Can I use this SendGrid transport in Laravel 9 or Laravel 10?
Not directly. Laravel 9 replaced SwiftMailer with Symfony Mailer, and this package only provides a Swift_Transport implementation selected through SwiftMailer configuration. You could manually instantiate the transport, but you would bypass everything the bundle contributes and inherit an unmaintained dependency. Use SendGrid's SMTP relay or the SendGrid PHP SDK behind a Laravel mail transport instead.
How do I install and configure the bundle in a Symfony application?
Run composer require expertcoder/swiftmailer-send-grid-bundle, then set swiftmailer transport to expertcoder_swift_mailer.send_grid in config/packages/swiftmailer.yaml. Put your SendGrid API key in the .env file and optionally define categories in config/packages/expert_coder_swiftmailer_send_grid.yaml. For non-Flex apps you register ExpertCoderSwiftmailerSendGridBundle in AppKernel.php and configure api_key under expert_coder_swiftmailer_send_grid.
Does this bundle work with Symfony 5 or Symfony 6?
There is no supported path. The last release was November 2019 and the bundle targets the Symfony 3.x to 4.x bundle and SwiftMailer wiring generation. Symfony 5+ moved to Symfony Mailer and deprecated SwiftMailer, so the transport service and configuration shape this bundle depends on are gone. For maintained Symfony projects, use symfony/sendgrid-mailer instead.
What SwiftMailer version does this bundle require?
The 2.x line depends on SwiftMailer and the SendGrid PHP library, and it was built for the SwiftMailer generation that shipped with Symfony 3.4 and 4.4. SwiftMailer reached end of life in November 2021, so no current Laravel or Symfony release includes it. You should confirm the exact Composer constraints against your lockfile before attempting anything.
How do I set the SendGrid API key and categories with this package?
In a Symfony Flex app, set the API key in your .env file and define optional categories in config/packages/expert_coder_swiftmailer_send_grid.yaml. In older Symfony apps, configure api_key and categories under expert_coder_swiftmailer_send_grid in config.yml. Categories are applied globally to all mail sent through the transport and appear in the SendGrid dashboard.
Does this transport support attachments, dynamic templates, or per-message categories?
Feature coverage is narrow by design: configurable global categories, custom headers, plugin support, and multipart/alternative messages. Attachments, dynamic templates, per-message categories, webhook or bounce ingestion, retries, and rate-limit handling are absent or only partial. Failures surface as SwiftMailer transport exceptions, so plan instrumentation separately.
What should Laravel developers use instead of this bundle for SendGrid?
The lowest-effort option is SendGrid's SMTP relay at smtp.sendgrid.net on port 587 with the username apikey and your API key as the password, which works on every supported Laravel version with no new dependency. If you need API-only features such as dynamic templates or scheduling, wrap the SendGrid PHP SDK in a small custom Laravel mail transport with a named owner. For Symfony, symfony/sendgrid-mailer is the maintained first-party successor.
Is expertcoder/swiftmailer-send-grid-bundle maintained and safe for production?
It is effectively abandoned: last release November 2019, around 14 stars, and zero dependents, so there is no downstream pressure to fix regressions or add PHP 8.x and Symfony 5+ support. Technical risk is structural rather than a specific security advisory, because it wraps an aging SendGrid SDK and inherits SwiftMailer's EOL status. Adopt it only as a time-boxed stopgap in a live Symfony 3.4 or 4.x app with a funded decommission date.
How do I test the SendGrid transport locally?
The bundle provides a small helper for launching tests locally, but the practical approach is to keep SwiftMailer's null or file transport in test environments and only enable expertcoder_swift_mailer.send_grid in staging. Mock the SendGrid client or use a fake API key with recorded responses so you do not send real mail. Because failures appear as transport exceptions, assert on those in integration tests.
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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style