PHPackages                             mvdnbrk/postmark-inbound - 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. [API Development](/categories/api)
4. /
5. mvdnbrk/postmark-inbound

ActiveLibrary[API Development](/categories/api)

mvdnbrk/postmark-inbound
========================

API to process Postmark Inbound Webhooks.

v2.4.0(5y ago)81.8k2MITPHPPHP ^7.1 || ^8.0

Since Sep 7Pushed 5y ago2 watchersCompare

[ Source](https://github.com/mvdnbrk/postmark-inbound)[ Packagist](https://packagist.org/packages/mvdnbrk/postmark-inbound)[ Docs](https://github.com/mvdnbrk/postmark-inbound)[ GitHub Sponsors](https://github.com/mvdnbrk)[ RSS](/packages/mvdnbrk-postmark-inbound/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (23)Used By (0)

[![Postmark Inbound](https://camo.githubusercontent.com/bc1bd67d420c959e59946436cc159be4443e56c4620a1287d9b1c49748a982d6/68747470733a2f2f706f73746d61726b6170702e636f6d2f696d616765732f6c6f676f2e737667)](https://postmarkapp.com)

postmark-inbound
================

[](#postmark-inbound)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e5d97e3573d4c01bc49d6964f91d0b8ba8c0bce5073487c0c0c6496f74a54f81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d76646e62726b2f706f73746d61726b2d696e626f756e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mvdnbrk/postmark-inbound)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Tests](https://camo.githubusercontent.com/6acdfeb3249cc98ff7e5b2579c872b86a6ed2e951ef1cec5754120d76f8bdaa6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d76646e62726b2f706f73746d61726b2d696e626f756e642f74657374732f6d61696e3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mvdnbrk/postmark-inbound/actions?query=workflow%3Atests)[![StyleCI](https://camo.githubusercontent.com/136322f16c17ce27a0aaf3d3f0b6c4b90c4dd4767cb101462caf05459ca99038/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3130323734343834382f736869656c643f7374796c653d666c61742d737175617265266272616e63683d6d61696e)](https://github.styleci.io/repos/102744848)[![Total Downloads](https://camo.githubusercontent.com/c2dfecde8778de3126594266cd18a95f9bdc7f774804efe6323ebd9d82371f06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d76646e62726b2f706f73746d61726b2d696e626f756e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mvdnbrk/postmark-inbound)

Simple API to process Postmark Inbound Webhooks.

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

[](#installation)

You can install the package via composer:

```
composer require mvdnbrk/postmark-inbound
```

Usage
-----

[](#usage)

```
$inbound = new \Mvdnbrk\Postmark\InboundMessage(file_get_contents('php://input'));

$inbound->from->name;                   // John Doe
$inbound->from->email;                  // john@example.com
$inbound->from->full;                   // John Doe

$inbound->tag;
$inbound->replyTo;
$inbound->textBody;
$inbound->htmlBody;
$inbound->messageId;                    // MessageID assigned by Postmark.
$inbound->messageIdFromHeaders;         // Message-ID value from headers.
$inbound->strippedTextReply;
$inbound->originalRecipient;

$inbound->originalDate;                 // Wed, 6 Sep 2017 12:00:00 +0200
$inbound->date;                         // PostmarkDate::class which is an extension of the DateTime::class
$inbound->date->format('Y-m-d H:i:s')   // 2017-09-06 12:00:00
$inbound->date->isUtc                   // boolean, is the date in the UTC timezone?
$inbound->date->timezone;               // +02:00
$inbound->date->inUtcTimezone()         // Sets the timezone to UTC.
$inbound->subject;                      // Subject of the message.

$inbound->isSpam;                       // boolean, is the message to be considered as spam?
$inbound->spamStatus;                   // Spam status, defaults to 'No' when not present.
$inbound->spamScore;                    // float, defaults to 0.0 when not present.

$inbound->to->count()                   // Recipient count.
$inbound->cc->count()
$inbound->bcc->count()

$inbound->attachments->count()          // Attachment count.

$inbound->headers->count()              // Header count.
```

### Recipients

[](#recipients)

```
$inbound->to->each(function($contact) {
    $contact->name;
    $contact->email;
    $contact->full;
    $contact->mailboxHash;
});

$inbound->cc->each(function($contact) {
    $contact->name;
    ...
});

$inbound->bcc->each(function($contact) {
    $contact->name;
    ...
});
```

Get the first recipient:

```
$inbound->to->first();

```

### Attachments

[](#attachments)

```
$inbound->attachments->each(function($attachment) {
    $attachment->name;
    $attachment->contentType;
    $attachment->contentLength;
    $attachment->content();         // Base64 decoded data
});
```

Get the first attachment:

```
$inbound->attachments->first();
```

Get the last attachment:

```
$inbound->attachments->last();
```

### Headers

[](#headers)

The Message-ID in the headers are sometimes keyed with upper `ID` and sometimes they are in the format of `Id`. So if you want to get the Message-ID from a message you can simply use the `$inbound->messageIdFromHeaders` helper attribute. Please note that `$inbound->messageId` will give you the id of the message that was assigned by Postmark.

```
$inbound->headers->each(function($value, $key) {
    ...
});

$inbound->headers->get('Message-ID');
$inbound->headers->get('MIME-Version');
$inbound->headers->get('Received-SPF');
$inbound->headers->get('X-Spam-Score');
$inbound->headers->get('X-Spam-Status');
...
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Mark van den Broek](https://github.com/mvdnbrk)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity78

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

Recently: every ~163 days

Total

22

Last Release

1894d ago

Major Versions

v1.0.5 → v2.0.02017-11-07

PHP version history (5 changes)v1.0.0PHP ~5.6|~7.0

v2.1.0PHP &gt;=7.0

v2.2.0PHP &gt;=7.1

v2.3.7PHP ^7.1

v2.4.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e8e321e8c6bc0e5ac8a1db41d1a983ac86888bd61de07afd02ba1cc5c3939c5?d=identicon)[mvdnbrk](/maintainers/mvdnbrk)

---

Top Contributors

[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (172 commits)")

---

Tags

e-mailinboundinbound-emailsinbound-webhookspostmarkpostmark-apipostmark-webhookspostmarkappwebhooke-mailpostmarkinbound

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mvdnbrk-postmark-inbound/health.svg)

```
[![Health](https://phpackages.com/badges/mvdnbrk-postmark-inbound/health.svg)](https://phpackages.com/packages/mvdnbrk-postmark-inbound)
```

###  Alternatives

[kyon147/laravel-shopify

Shopify package for Laravel to aide in app development

473252.9k](/packages/kyon147-laravel-shopify)[wecreatesolutions/postmark-inbound

Convenience library for postmark inbound email parsing.

1417.2k](/packages/wecreatesolutions-postmark-inbound)[mpociot/captainhook

Add webhooks to your Laravel app.

3358.9k](/packages/mpociot-captainhook)[mvdnbrk/laravel-postmark-webhooks

Handle Postmark webhooks in a Laravel application.

2644.4k](/packages/mvdnbrk-laravel-postmark-webhooks)[stymiee/authnetjson

Library that abstracts Authorize.Net's JSON APIs. This includes the Advanced Integration Method (AIM), Automated Recurring Billing (ARB), Customer Information Manager (CIM), Transaction Reporting, Simple Integration Method (SIM), and Webhooks.

19545.7k](/packages/stymiee-authnetjson)[kayedspace/laravel-n8n

A complete, expressive, and fluent Laravel client for the n8n public REST API and Webhooks Triggering.

1376.2k1](/packages/kayedspace-laravel-n8n)

PHPackages © 2026

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