PHPackages                             expertcoder/swiftmailer-send-grid-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. expertcoder/swiftmailer-send-grid-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

expertcoder/swiftmailer-send-grid-bundle
========================================

Swiftmailer Transport and Symfony bundle for Sendgrid

2.2.5(6y ago)16243.4k↑1209.1%15[1 issues](https://github.com/expertcoder/SwiftmailerSendGridBundle/issues)MITPHPPHP &gt;=7.0.0CI failing

Since Feb 13Pushed 6y ago2 watchersCompare

[ Source](https://github.com/expertcoder/SwiftmailerSendGridBundle)[ Packagist](https://packagist.org/packages/expertcoder/swiftmailer-send-grid-bundle)[ Docs](https://github.com/expertcoder/SwiftmailerSendGridBundle)[ RSS](/packages/expertcoder-swiftmailer-send-grid-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (14)Used By (0)

[![Freelance Banner](https://camo.githubusercontent.com/f9969859b325b35ebdf329034294c985a7ae0cf0f13329551cf8eb970375e9b8/68747470733a2f2f73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f7374617469632e657870657274636f6465722e696f2f6769746875622d62616e6e65722f62616e6e65722e706e67)](https://camo.githubusercontent.com/f9969859b325b35ebdf329034294c985a7ae0cf0f13329551cf8eb970375e9b8/68747470733a2f2f73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f7374617469632e657870657274636f6465722e696f2f6769746875622d62616e6e65722f62616e6e65722e706e67)

SwiftmailerSendGridBundle
=========================

[](#swiftmailersendgridbundle)

[![Latest Version](https://camo.githubusercontent.com/97489dca954e384f235d81705f178cc5603606e9aa139a0ab3f169576568c119/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f657870657274636f6465722f53776966746d61696c657253656e644772696442756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/expertcoder/SwiftmailerSendGridBundle/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/20982459b5cf472165164a6ae2a15f3dc74e18b2e97cc3136d8578fed615d502/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f657870657274636f6465722f53776966746d61696c657253656e644772696442756e646c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/expertcoder/SwiftmailerSendGridBundle)

Symfony bundle for SendGrid. Utilizes the SendGrid PHP Library to make it compatiable with SwiftMailer.

**Older version (1.x) can be found here:**

Installation
------------

[](#installation)

`composer require expertcoder/swiftmailer-send-grid-bundle`

**or manually**

*composer.json*

```
"require": {
    ...
    "expertcoder/swiftmailer-send-grid-bundle": "~2.0"
}
```

*config/packages/swiftmailer.yaml*

```
swiftmailer:
    transport: expertcoder_swift_mailer.send_grid
```

Don't forget to set your Sendgrid API Key in your *.env* file, and that you can set your mail's categories from `config/packages/expert_coder_swiftmailer_send_grid.yaml`

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

*AppKernel.php*

```
$bundles = [
    // ...
    new ExpertCoder\Swiftmailer\SendGridBundle\ExpertCoderSwiftmailerSendGridBundle(),
];
```

*parameters.yml.dist*

```
parameters:
    sendgrid_api_key: PleaseEnterSendGridApiKey
```

*config.yml*

```
swiftmailer:
    transport: expertcoder_swift_mailer.send_grid

expert_coder_swiftmailer_send_grid:
    api_key: %sendgrid_api_key%
    categories: [my_category] # optional, will be added to all mails sent (can be seen on sendgrid dashboard)
```

Symfony 3
---------

[](#symfony-3)

Since Symfony 3.2, you must name the custom transport service swiftmailer.mailer.transport.&lt; name &gt; so you can use one of the solutions below:

*services.yml*

```
services:
    swiftmailer.mailer.transport.expertcoder_swift_mailer.send_grid.transport:
      alias: expertcoder_swift_mailer.send_grid.transport
```

**OR**

*config.yml*

```
swiftmailer:
    transport: 'swiftmailer.mailer.transport.expertcoder_swift_mailer.send_grid'
```

Tests
-----

[](#tests)

This bundle provide a little helper to launch tests locally and here is a quick explanation:

- The `config_test.yml` file contains configuration associated with the bundle.
- The `manual-test.sh` helps you test against a specific symfony version and is the main helper to execute tests. You just have to do `sh tests/manual-test.sh versionNumber` where versionNumber is the main Symfony version you want to test (ex: 4)
- The last file contains PhpUnit tests with help of `nyholm/symfony-bundle-test`. Note that we set a timeout of 1sec when sending mail to sendgrid as we do not test the actual sendgrid API with a real key.

Important !
-----------

[](#important-)

Following RFC 1341, section 7.2, if either `text/html` or `text/plain` are to be sent in your email: `text/plain` needs to be first, followed by `text/html`, followed by any other content.

For more informations, please see [SwiftMailer](https://swiftmailer.symfony.com/docs/messages.html#quick-reference) and [RFC 1341](https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html)

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~113 days

Total

13

Last Release

2445d ago

Major Versions

1.x-dev → 2.0.02018-06-06

PHP version history (3 changes)1.0.0PHP &gt;=5.4

2.0.0PHP &gt;=5.6

2.1.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18326086?v=4)[Sam Anthony](/maintainers/expertcoder)[@expertcoder](https://github.com/expertcoder)

---

Top Contributors

[![moux2003](https://avatars.githubusercontent.com/u/4438388?v=4)](https://github.com/moux2003 "moux2003 (24 commits)")[![expertcoder](https://avatars.githubusercontent.com/u/18326086?v=4)](https://github.com/expertcoder "expertcoder (9 commits)")[![geekdevs](https://avatars.githubusercontent.com/u/864822?v=4)](https://github.com/geekdevs "geekdevs (3 commits)")[![joubertredrat](https://avatars.githubusercontent.com/u/1520407?v=4)](https://github.com/joubertredrat "joubertredrat (1 commits)")[![TOTOleHero](https://avatars.githubusercontent.com/u/657752?v=4)](https://github.com/TOTOleHero "TOTOleHero (1 commits)")[![acasademont](https://avatars.githubusercontent.com/u/825021?v=4)](https://github.com/acasademont "acasademont (1 commits)")[![xav-hydra](https://avatars.githubusercontent.com/u/32839160?v=4)](https://github.com/xav-hydra "xav-hydra (1 commits)")[![bziraoui](https://avatars.githubusercontent.com/u/6359753?v=4)](https://github.com/bziraoui "bziraoui (1 commits)")[![evertharmeling](https://avatars.githubusercontent.com/u/308513?v=4)](https://github.com/evertharmeling "evertharmeling (1 commits)")

---

Tags

phpsendgridswiftmailersymfony-bundlesymfony2symfony3symfony4

### Embed Badge

![Health badge](/badges/expertcoder-swiftmailer-send-grid-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/expertcoder-swiftmailer-send-grid-bundle/health.svg)](https://phpackages.com/packages/expertcoder-swiftmailer-send-grid-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M225](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M651](/packages/shopware-core)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k14](/packages/2lenet-crudit-bundle)[contao/core-bundle

Contao Open Source CMS

1301.7M3.0k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
