2017 © Pedro Peláez
 

library postmark-inbound

API to process Postmark Inbound Webhooks.

image

heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  • Tuesday, May 8, 2018
  • by heyhoo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 16 Versions
  • 0 % Grown

The README.md

<, (*1)

p align="center">Postmark Inbound, (*2)

postmark-inbound

Latest Version on Packagist ![Software License][ico-license] [Tests][link-tests] StyleCI ![Total Downloads][ico-downloads], (*3)

Simple API to process Postmark Inbound Webhooks., (*4)

Installation

You can install the package via composer:, (*5)

``` bash composer require mvdnbrk/postmark-inbound, (*6)


## Usage ``` php $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 <john@example.com> $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

$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:, (*7)

$inbound->to->first();

Attachments

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

Get the first attachment:, (*8)

$inbound->attachments->first();

Get the last attachment:, (*9)

$inbound->attachments->last();

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., (*10)

$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

Please see CHANGELOG for more information on what has changed recently., (*11)

Contributing

Please see CONTRIBUTING for details., (*12)

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities., (*13)

Credits

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

08/05 2018

dev-master

9999999-dev https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail heyhoo

04/05 2018

v2.3.3

2.3.3.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail

01/05 2018

v2.3.2

2.3.2.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail

01/05 2018

v2.3.1

2.3.1.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail

30/04 2018

v2.3.0

2.3.0.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail

30/04 2018

dev-analysis-qx2Zla

dev-analysis-qx2Zla https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail

30/04 2018

v2.2.0

2.2.0.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

postmark webhook inbound e-mail

25/04 2018

v2.1.1

2.1.1.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

postmark webhook inbound e-mail

25/04 2018

v2.1.0

2.1.0.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

postmark webhook inbound e-mail

07/11 2017

v2.0.0

2.0.0.0 https://github.com/mvdnbrk/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound e-mail

07/11 2017

v1.0.5

1.0.5.0 https://github.com/heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound

07/11 2017

v1.0.4

1.0.4.0 https://github.com/heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound heyhoo

10/10 2017

v1.0.3

1.0.3.0 https://github.com/heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound heyhoo

05/10 2017

v1.0.2

1.0.2.0 https://github.com/heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound heyhoo

04/10 2017

v1.0.1

1.0.1.0 https://github.com/heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound heyhoo

07/09 2017

1.0.0

1.0.0.0 https://github.com/heyhoo/postmark-inbound

API to process Postmark Inbound Webhooks.

  Sources   Download

MIT

The Requires

  • php ~5.6|~7.0

 

The Development Requires

postmark webhook inbound heyhoo