{"id":23003703,"url":"https://github.com/stechstudio/email-event-parser","last_synced_at":"2025-07-14T01:04:31.609Z","repository":{"id":57059337,"uuid":"67536799","full_name":"stechstudio/email-event-parser","owner":"stechstudio","description":"Parses event data from a variety of email service providers","archived":false,"fork":false,"pushed_at":"2016-09-06T19:51:12.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T14:27:14.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stechstudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-06T18:44:02.000Z","updated_at":"2016-09-06T18:45:27.000Z","dependencies_parsed_at":"2022-08-24T07:30:34.308Z","dependency_job_id":null,"html_url":"https://github.com/stechstudio/email-event-parser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stechstudio/email-event-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Femail-event-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Femail-event-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Femail-event-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Femail-event-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stechstudio","download_url":"https://codeload.github.com/stechstudio/email-event-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Femail-event-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265228877,"owners_count":23731086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T07:15:04.126Z","updated_at":"2025-07-14T01:04:31.571Z","avatar_url":"https://github.com/stechstudio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Email Event Parser\n\nEasily parse event data from a variety of email service providers. Currently supports SendGrid and Mailgun webhook formats.\n\n## Installation\n\n```\ncomposer require stechstudio/email-event-parser\n```\n\n## Basic usage\n\nWhen you know where the event is coming from, you can create the adapter yourself:\n\n```\n$event = new \\STS\\EmailEventParser\\EmailEvent(\n    new \\STS\\EmailEventParser\\Adapters\\MailgunWebhook($payload)\n);\n```\n\nThe 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.\n\n## Automatic service detection\n\nIf you are expecting webhooks from multiple service providers, you can use the automatic detection:\n\n```\n$event = \\STS\\EmailEventParser\\EmailEvent::detect($payload);\n```\n\nThis will examine the event data and figure out which service sent the event, and which adapter to use.\n\n## API\n\nOnce you have an event object, here is a list of methods that are available:\n\n| **Method** | **Description** |\n| ---------- | --------------- |\n| getType() | Event type (delivered, bounced, etc) |\n| getService() | Service provider name (SendGrid, Mailgun) |\n| getMessageId() | SMTP ID of the email |\n| getRecipient() | Recipient email address |\n| getTimestamp() | Unix timestamp for the event |\n| getResponse() | Response from the remote SMTP server |\n| getReason() | Additional explanation for the event type |\n| getCode() | Status or error code |\n| getTags() | Collection of tag values |\n| getData() | Additional custom data attached to the email, as a collection of key/value pairs |\n| get($key) | Retrieve any `$key` from the original event data payload |\n| toArray() | Returns... ya know |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstechstudio%2Femail-event-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstechstudio%2Femail-event-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstechstudio%2Femail-event-parser/lists"}