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 service and is selected through swiftmailer transport configuration. There is no Laravel service provider, no Laravel mail manager integration, and no config/mail.php hook. Laravel 9 and later use Symfony Mailer without SwiftMailer, so the integration surface does not exist there.
How do I install and configure this SendGrid transport in Symfony?
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 an environment variable and optionally define categories in expert_coder_swiftmailer_send_grid.yaml. Applications without Symfony Flex must register ExpertCoderSwiftmailerSendGridBundle in AppKernel.php and set the api_key parameter in config.yml.
Can I use this package with Laravel 9 or Laravel 10?
No. Laravel 9 replaced SwiftMailer with Symfony Mailer, so there is no Swift_Transport to swap out. Even on Laravel 8 you would have to manually instantiate the transport against the mail manager, bypassing everything the bundle contributes and inheriting an unmaintained dependency. Use SendGrid SMTP relay or a maintained Laravel mail transport instead.
Which Laravel versions still ship SwiftMailer so this bundle could work?
Laravel 8 and earlier bundled SwiftMailer, while Laravel 9 removed it entirely. However, Laravel 8 is out of security support, so adopting this bundle there is not a responsible choice. In practice, treat this package as viable only for a Symfony 3.4 or 4.4 application already running SwiftMailer in production.
What SendGrid features does this transport actually support?
It supports configurable categories applied to all mail, custom headers, plugin support, and multipart/alternative messages. Attachments, per-message categories, dynamic templates, scheduling, webhook or bounce ingestion, retries, and rate-limit handling are absent or only partial. Failures surface only as SwiftMailer transport exceptions, so you get little SendGrid-specific diagnostics.
Does it support attachments or dynamic templates?
Attachments are not a documented feature and are partial at best, and SendGrid dynamic templates are not supported. The adapter translates basic SwiftMailer messages into SendGrid PHP SDK calls and little more. If you need templates, scheduling, or subuser scoping, call the SendGrid SDK directly behind an internal adapter or use an SMTP relay.
What is the maintained alternative to this bundle for Symfony?
symfony/sendgrid-mailer is the first-party successor and the correct target for any Symfony app moving off SwiftMailer. For Laravel, the built-in SMTP transport pointed at smtp.sendgrid.net on port 587 with the username apikey requires zero new dependencies. A direct SendGrid SDK wrapper is justified only when a specific API-only capability is a hard requirement and someone owns it.
Is this package still maintained, and does it support PHP 8 or Symfony 5 and above?
The last release was November 2019, with 14 stars and 0 dependents, so there is no downstream pressure to fix regressions or triage issues. There is no realistic PHP 8.x or Symfony 5 and above support path, and it depends on SwiftMailer, which reached end of life in November 2021. Treat it as abandoned rather than merely quiet.
How do I send email through SendGrid in Laravel without this bundle?
Set MAIL_MAILER to smtp, MAIL_HOST to smtp.sendgrid.net, MAIL_PORT to 587, MAIL_USERNAME to apikey, and MAIL_PASSWORD to your SendGrid API key. This works on every supported Laravel version with no new Composer dependency. It does lose API-only features such as dynamic templates, which you can add later through the SendGrid SDK if needed.
What are the production risks of adopting this bundle?
The risk is structural rather than security-focused: the package is abandoned, SwiftMailer is EOL, the SendGrid SDK generation is aging, and there is no community triage. Feature coverage is deliberately narrow, and deliverability instrumentation such as bounce and complaint webhooks, retries, and rate-limit handling is not provided. Adopt it only as a time-boxed stopgap in a live Symfony 3.4 or 4.x application, with a named owner and a decommission date.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
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
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core