PHPackages                             stechstudio/email-event-parser - 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. stechstudio/email-event-parser

ActiveLibrary

stechstudio/email-event-parser
==============================

Parses event data from a variety of email service providers

0.2.1(9y ago)073MITPHP

Since Sep 6Pushed 9y ago3 watchersCompare

[ Source](https://github.com/stechstudio/email-event-parser)[ Packagist](https://packagist.org/packages/stechstudio/email-event-parser)[ RSS](/packages/stechstudio-email-event-parser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Email Event Parser
==================

[](#email-event-parser)

Easily parse event data from a variety of email service providers. Currently supports SendGrid and Mailgun webhook formats.

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

[](#installation)

```
composer require stechstudio/email-event-parser

```

Basic usage
-----------

[](#basic-usage)

When you know where the event is coming from, you can create the adapter yourself:

```
$event = new \STS\EmailEventParser\EmailEvent(
    new \STS\EmailEventParser\Adapters\MailgunWebhook($payload)
);

```

The adapter `$payload` should be an array of event data. It's up to you to `json_decode` this if needed. In some cases it might be appropriate to just pass in `$_POST` as the payload.

Automatic service detection
---------------------------

[](#automatic-service-detection)

If you are expecting webhooks from multiple service providers, you can use the automatic detection:

```
$event = \STS\EmailEventParser\EmailEvent::detect($payload);

```

This will examine the event data and figure out which service sent the event, and which adapter to use.

API
---

[](#api)

Once you have an event object, here is a list of methods that are available:

**Method****Description**getType()Event type (delivered, bounced, etc)getService()Service provider name (SendGrid, Mailgun)getMessageId()SMTP ID of the emailgetRecipient()Recipient email addressgetTimestamp()Unix timestamp for the eventgetResponse()Response from the remote SMTP servergetReason()Additional explanation for the event typegetCode()Status or error codegetTags()Collection of tag valuesgetData()Additional custom data attached to the email, as a collection of key/value pairsget($key)Retrieve any `$key` from the original event data payloadtoArray()Returns... ya know

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~0 days

Total

3

Last Release

3538d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/315be5f111b5501a41b99a0205c9c85915335391168a0ed10316546a1a38bbd8?d=identicon)[jszobody](/maintainers/jszobody)

---

Top Contributors

[![jszobody](https://avatars.githubusercontent.com/u/203749?v=4)](https://github.com/jszobody "jszobody (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stechstudio-email-event-parser/health.svg)

```
[![Health](https://phpackages.com/badges/stechstudio-email-event-parser/health.svg)](https://phpackages.com/packages/stechstudio-email-event-parser)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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