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

gulaandrij/swiftmailer-send-grid-bundle

A Symfony bundle that integrates SendGrid with Swift Mailer by providing a dedicated transport, letting applications send transactional email through SendGrid's API with minimal configuration and familiar Swift Mailer usage.

View on GitHub
Deep Wiki
Context7

Integrates SendGrid with Swiftmailer in Symfony applications, providing a simple way to send transactional email through SendGrid’s API while keeping Symfony’s mailer configuration. Configure your API key and transport options via bundle settings, then use the standard Swiftmailer mailer service.

  • Adds a SendGrid transport for Swiftmailer
  • Configurable API key and transport settings
  • Works with Symfony’s mailer service and existing email flows
  • Lightweight bundle with straightforward setup
Frequently asked questions about Swiftmailer Send Grid Bundle
What is gulaandrij/swiftmailer-send-grid-bundle used for?
It is a Symfony 2/3 bundle that adds a SendGrid transport for SwiftMailer so applications can send transactional email through SendGrid's HTTP API instead of SMTP. You configure an API key and sender, then continue building and sending messages with SwiftMailer as usual. Its useful scope is limited to legacy Symfony applications that are already committed to SwiftMailer.
How do I install and configure this SendGrid bundle in Symfony?
Install it with Composer in a legacy Symfony 2.8 to 4.x application, register the bundle, and configure your SendGrid API key and sender address. The bundle wires a Swift_Transport implementation into SwiftMailer so existing Swift_Message code can keep working. In practice, modern PHP and Symfony constraints often require forking and patching before the first successful send.
Does this package work with Laravel?
No. It is a Symfony bundle with no Laravel service provider, facade, or mail transport integration, so it cannot plug into Laravel's Mail system directly. Laravel developers should use Laravel's built-in SMTP or API-based mail transports, or call the official SendGrid PHP SDK from a custom transport. Trying to bridge this bundle into Laravel would add abandoned dependencies without providing Laravel-native configuration.
Which Symfony and PHP versions does swiftmailer-send-grid-bundle support?
The realistic target is Symfony 2.8 through 4.x with SwiftMailer and Symfony's SwiftmailerBundle still installed. Its Composer constraints predate PHP 7.4 and PHP 8.x, and the code was not written for PHP 8's stricter runtime behavior. On Symfony 5.3 and later the transport service it decorates is deprecated or removed, and on Symfony 6 and 7 it cannot be wired at all.
Is gulaandrij/swiftmailer-send-grid-bundle maintained?
No. The last release was in July 2018, it has very few stars and zero dependents, and Swiftmailer itself reached end of life in November 2021. There is no active downstream population discovering breakage, filing issues, or publishing patches. Treat it as functionally abandoned rather than as a package that will receive compatibility or security updates.
Is it safe to use this bundle in production?
The technical risk is high because the package is abandoned and depends on abandoned SwiftMailer components plus an older HTTP client stack. The MIT license removes legal exposure, but pinning it means accepting permanent exposure to future vulnerabilities in transitive dependencies with no upgrade path. It is only defensible in a legacy Symfony application that is already being retired, with a named owner and a removal date.
What SendGrid features does this bundle support?
The bundle focuses on making SendGrid's API usable as a SwiftMailer transport, so basic sending, sender configuration, and standard Swift_Message content are the core use case. Advanced SendGrid semantics such as dynamic templates, categories, custom arguments, unsubscribe groups, subuser scoping, and event webhook correlation are not a safe assumption. Verify any required feature against the pinned code before relying on it, because the bridge predates many current SendGrid API capabilities.
How do I test SendGrid email sending with this bundle?
There is no maintained test suite for modern PHP and no official test doubles for this bundle. In a legacy application, isolate sending behind a thin facade and use SwiftMailer's array transport or a fake transport in tests, then assert message construction separately from actual SendGrid delivery. Do not make live SendGrid API calls in CI, and add explicit coverage for any SendGrid-specific headers or metadata you depend on.
What are the best alternatives to swiftmailer-send-grid-bundle?
For modern Symfony, use symfony/sendgrid-mailer, which provides a SendgridTransport and TransportFactory against the v3 Mail Send API and plugs into the standard Mailer DSN. If you need the full SendGrid API surface, use the official sendgrid/sendgrid-php SDK directly. Laravel applications should use Laravel's mail transports or a custom transport built on the official SDK instead of this Symfony bundle.
How do I migrate away from this bundle to Symfony Mailer or the SendGrid SDK?
Inventory every SwiftMailer construction site and any Swiftmailer-specific behavior such as spooling, plugins, embedded images, and custom headers. Rewrite Swift_Message construction to Symfony\Component\Mime\Email, set MAILER_DSN to sendgrid+api://KEY@default, and remove the bundle registration and transport override in one commit. Re-map SendGrid-specific semantics like categories, metadata, and templates as message headers on the bridge, and test those mappings carefully because they do not translate one-to-one.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo