{"id":21524215,"url":"https://github.com/mvdnbrk/postmark-inbound","last_synced_at":"2025-08-24T13:38:55.212Z","repository":{"id":54224671,"uuid":"102744848","full_name":"mvdnbrk/postmark-inbound","owner":"mvdnbrk","description":"API to process Postmark Inbound Webhooks.","archived":false,"fork":false,"pushed_at":"2021-03-02T15:08:00.000Z","size":160,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-07T15:46:24.065Z","etag":null,"topics":["e-mail","inbound","inbound-emails","inbound-webhooks","postmark","postmark-api","postmark-webhooks","postmarkapp"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvdnbrk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null},"funding":{"github":"mvdnbrk"}},"created_at":"2017-09-07T14:09:49.000Z","updated_at":"2024-07-25T00:57:39.000Z","dependencies_parsed_at":"2022-08-13T09:31:21.419Z","dependency_job_id":null,"html_url":"https://github.com/mvdnbrk/postmark-inbound","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/mvdnbrk/postmark-inbound","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdnbrk%2Fpostmark-inbound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdnbrk%2Fpostmark-inbound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdnbrk%2Fpostmark-inbound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdnbrk%2Fpostmark-inbound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvdnbrk","download_url":"https://codeload.github.com/mvdnbrk/postmark-inbound/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdnbrk%2Fpostmark-inbound/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265281124,"owners_count":23739863,"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":["e-mail","inbound","inbound-emails","inbound-webhooks","postmark","postmark-api","postmark-webhooks","postmarkapp"],"created_at":"2024-11-24T01:22:51.572Z","updated_at":"2025-07-14T11:06:46.374Z","avatar_url":"https://github.com/mvdnbrk.png","language":"PHP","funding_links":["https://github.com/sponsors/mvdnbrk"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://postmarkapp.com\" target=\"_blank\"\u003e\u003cimg src=\"https://postmarkapp.com/images/logo.svg\" alt=\"Postmark Inbound\" width=\"240\" height=\"40\"\u003e\u003c/a\u003e\n\n# postmark-inbound\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Tests][ico-tests]][link-tests]\n[![StyleCI][ico-styleci]][link-styleci]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nSimple API to process Postmark Inbound Webhooks.\n\n## Installation\n\nYou can install the package via composer:\n\n``` bash\ncomposer require mvdnbrk/postmark-inbound\n```\n\n## Usage\n\n``` php\n$inbound = new \\Mvdnbrk\\Postmark\\InboundMessage(file_get_contents('php://input'));\n\n$inbound-\u003efrom-\u003ename;                   // John Doe\n$inbound-\u003efrom-\u003eemail;                  // john@example.com\n$inbound-\u003efrom-\u003efull;                   // John Doe \u003cjohn@example.com\u003e\n\n$inbound-\u003etag;\n$inbound-\u003ereplyTo;\n$inbound-\u003etextBody;\n$inbound-\u003ehtmlBody;\n$inbound-\u003emessageId;                    // MessageID assigned by Postmark.\n$inbound-\u003emessageIdFromHeaders;         // Message-ID value from headers.\n$inbound-\u003estrippedTextReply;\n$inbound-\u003eoriginalRecipient;\n\n$inbound-\u003eoriginalDate;                 // Wed, 6 Sep 2017 12:00:00 +0200\n$inbound-\u003edate;                         // PostmarkDate::class which is an extension of the DateTime::class\n$inbound-\u003edate-\u003eformat('Y-m-d H:i:s')   // 2017-09-06 12:00:00\n$inbound-\u003edate-\u003eisUtc                   // boolean, is the date in the UTC timezone?\n$inbound-\u003edate-\u003etimezone;               // +02:00\n$inbound-\u003edate-\u003einUtcTimezone()         // Sets the timezone to UTC.\n$inbound-\u003esubject;                      // Subject of the message.\n\n$inbound-\u003eisSpam;                       // boolean, is the message to be considered as spam?\n$inbound-\u003espamStatus;                   // Spam status, defaults to 'No' when not present.\n$inbound-\u003espamScore;                    // float, defaults to 0.0 when not present.\n\n$inbound-\u003eto-\u003ecount()                   // Recipient count.\n$inbound-\u003ecc-\u003ecount()\n$inbound-\u003ebcc-\u003ecount()\n\n$inbound-\u003eattachments-\u003ecount()          // Attachment count.\n\n$inbound-\u003eheaders-\u003ecount()              // Header count.\n```\n\n### Recipients\n\n```php\n$inbound-\u003eto-\u003eeach(function($contact) {\n    $contact-\u003ename;\n    $contact-\u003eemail;\n    $contact-\u003efull;\n    $contact-\u003emailboxHash;\n});\n\n$inbound-\u003ecc-\u003eeach(function($contact) {\n    $contact-\u003ename;\n    ...\n});\n\n$inbound-\u003ebcc-\u003eeach(function($contact) {\n    $contact-\u003ename;\n    ...\n});\n```\n\nGet the first recipient:\n```\n$inbound-\u003eto-\u003efirst();\n```\n\n### Attachments\n\n```php\n$inbound-\u003eattachments-\u003eeach(function($attachment) {\n    $attachment-\u003ename;\n    $attachment-\u003econtentType;\n    $attachment-\u003econtentLength;\n    $attachment-\u003econtent();         // Base64 decoded data\n});\n```\n\nGet the first attachment:\n```php\n$inbound-\u003eattachments-\u003efirst();\n```\n\nGet the last attachment:\n```php\n$inbound-\u003eattachments-\u003elast();\n```\n\n### Headers\n\nThe Message-ID in the headers are sometimes keyed with upper `ID` and sometimes they are in the format of `Id`.\nSo if you want to get the Message-ID from a message you can simply use the `$inbound-\u003emessageIdFromHeaders` helper attribute.\nPlease note that `$inbound-\u003emessageId` will give you the id of the message that was assigned by Postmark.\n\n```php\n$inbound-\u003eheaders-\u003eeach(function($value, $key) {\n    ...\n});\n\n$inbound-\u003eheaders-\u003eget('Message-ID');\n$inbound-\u003eheaders-\u003eget('MIME-Version');\n$inbound-\u003eheaders-\u003eget('Received-SPF');\n$inbound-\u003eheaders-\u003eget('X-Spam-Score');\n$inbound-\u003eheaders-\u003eget('X-Spam-Status');\n...\n```\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Mark van den Broek][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/mvdnbrk/postmark-inbound.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-tests]: https://img.shields.io/github/workflow/status/mvdnbrk/postmark-inbound/tests/main?label=tests\u0026style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/mvdnbrk/postmark-inbound.svg?style=flat-square\n[ico-styleci]: https://github.styleci.io/repos/102744848/shield?style=flat-square\u0026branch=main\n\n[link-packagist]: https://packagist.org/packages/mvdnbrk/postmark-inbound\n[link-tests]: https://github.com/mvdnbrk/postmark-inbound/actions?query=workflow%3Atests\n[link-downloads]: https://packagist.org/packages/mvdnbrk/postmark-inbound\n[link-styleci]: https://github.styleci.io/repos/102744848\n[link-author]: https://github.com/mvdnbrk\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdnbrk%2Fpostmark-inbound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvdnbrk%2Fpostmark-inbound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdnbrk%2Fpostmark-inbound/lists"}