PHPackages                             netglue/sendgrid-webhook - 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. netglue/sendgrid-webhook

AbandonedArchivedModule[HTTP &amp; Networking](/categories/http)

netglue/sendgrid-webhook
========================

ZF2 Module to receive Webhooks sent by SendGrid

3.0.1(8y ago)0200MITPHPPHP &gt;=7.1

Since May 25Pushed 8y agoCompare

[ Source](https://github.com/netglue/Sendgrid-Webhook)[ Packagist](https://packagist.org/packages/netglue/sendgrid-webhook)[ RSS](/packages/netglue-sendgrid-webhook/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (6)Used By (0)

ZF2 Module: Send Grid Events Webhook
====================================

[](#zf2-module-send-grid-events-webhook)

A simple module for a ZF2 app that will receive [event webhooks from SendGrid](https://sendgrid.com/docs/API_Reference/Webhooks/event.html) and trigger a ZF2 event for each of the batched events received. You can then write your own listeners to do whatever you need to do with bounce processing etc.

Install
-------

[](#install)

Install with composer using `"netglue/sendgrid-webhook"`, enable the module in your `application.config.php` using the module name `'NetglueSendgrid'` and add custom configuration to change the route url perhaps or set up Basic HTTP Auth *(Recommended)*.

Test
----

[](#test)

`cd` to wherever the module is installed, issue a `composer install` followed by a `phpunit`.

Setup Basic Auth
----------------

[](#setup-basic-auth)

Create a configuration file in your autoload directory named something like `sendgrid.local.php` and enter values for username and password as outlined in `./config/module.config.php`.

Set an Alternate Webhook Endpoint/URL
-------------------------------------

[](#set-an-alternate-webhook-endpointurl)

Somewhere in your configuration files where you like to look after your routes, add a new one with configuration similar to this:

```
'router' => [
    'routes' => [
        'sendgrid-webhook' => [
            'options' => [
                'route' => '/somewhere/this-is-your-endpoint',
            ]
        ]
    ]
]

```

Setup SendGrid
--------------

[](#setup-sendgrid)

Navigate to your account at SendGrid and access the Settings -&gt; Mail Settings section. Click the *Event Notification* item and enter the url. By default, the URL should be something like: `https://yourdomain.com/netglue-sendgrid-events`.

Effectively, nothing will happen, but you should start to see something in your web server logs. You'll need to write some listeners to do something with the events triggered.

Write A Listener
----------------

[](#write-a-listener)

For example, in your main app's `Module.php` you could setup a listener to log the events with something like this:

```
public function onBoostrap(EventInterface $e)
{
    // Get a logger instance - change this…
    $services = $e->getApplication()->getServiceManager();
    $logger = $services->get('TheNameOfMyLogger');

    // Listen to all events sent by the EventEmitter
    $em = $e->getApplication()->getEventManager();
    $sharedEm = $em->getSharedManager();
    $sharedEm->attach(
        'NetglueSendgrid\Service\EventEmitter',
        '*',
        function($event) use ($logger) {
            $params = $event->getParams();
            $logger->debug(sprintf(
                'Send Grid Event "%s" was triggered with the event name %s',
                $params['data']['event'],
                $event->getName()
            ));
        }
    );
}

```

Changelog
---------

[](#changelog)

### 1.0.0

[](#100)

Initial release

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~190 days

Total

5

Last Release

2927d ago

Major Versions

1.0.0 → 2.0.02018-06-21

2.0.1 → 3.0.02018-06-26

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

2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6c21b0de8cc9938916a186f5f2ed0bee90a4e23e0b29cf7b9c18bfe99067f9b?d=identicon)[netglue](/maintainers/netglue)

---

Top Contributors

[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/netglue-sendgrid-webhook/health.svg)

```
[![Health](https://phpackages.com/badges/netglue-sendgrid-webhook/health.svg)](https://phpackages.com/packages/netglue-sendgrid-webhook)
```

###  Alternatives

[zf-commons/zfc-user

A generic user registration and authentication module for ZF2. Supports Zend\\Db and Doctrine2.

4851.1M71](/packages/zf-commons-zfc-user)[socalnick/scn-social-auth

Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.

21674.9k3](/packages/socalnick-scn-social-auth)[zfr/zfr-rest

Zend Framework 2 REST Module.

8120.7k](/packages/zfr-zfr-rest)[zfr/zfr-cors

Zend Framework module that let you deal with CORS requests

611.3M3](/packages/zfr-zfr-cors)

PHPackages © 2026

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