2017 © Pedro Peláez
 

library postmark-inbound-php

Postmark Inbound PHP Wrapper

image

priyolahiri/postmark-inbound-php

Postmark Inbound PHP Wrapper

  • Wednesday, April 3, 2013
  • by priyolahiri
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 0 Open issues
  • 4 Versions
  • 14 % Grown

The README.md

POSTMARK INBOUND HOOK

This is a simple API wrapper for Postmark Inbound Hook (http://developer.postmarkapp.com/developer-inbound.html), (*1)

Build Status, (*2)

Setup

With composer : ``` json { "require": { "jjaffeux/postmark-inbound-php": ">=2.0" } }, (*3)

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

Without composer : ``` php require_once '../lib/Postmark/Autoloader.php'; \Postmark\Autoloader::register();, (*4)

// this file should be the target of the callback you set in your postmark account $inbound = new \Postmark\Inbound(file_get_contents('php://input'));, (*5)


General Usage ------------- ``` php $inbound->Subject(); $inbound->FromEmail(); $inbound->FromFull(); $inbound->FromName(); $inbound->Date(); $inbound->ReplyTo(); $inbound->MailboxHash(); $inbound->Tag(); $inbound->MessageID(); $inbound->TextBody(); $inbound->HtmlBody();

Headers

``` php $inbound->Headers(); //default to spam status $inbound->Headers('X-Spam-Status'); $inbound->Headers('X-Spam-Checker-Version'); $inbound->Headers('X-Spam-Score'); $inbound->Headers('X-Spam-Tests'); $inbound->Headers('Received-SPF'); $inbound->Headers('MIME-Version'); $inbound->Headers('Received-SPF'); // pass neutral fail $inbound->Headers('Message-ID');, (*6)



Recipients and Undisclosed Recipients ------------------------------------- ``` php foreach($inbound->Recipients() as $recipient) { $recipient->Name; $recipient->Email; } foreach($inbound->UndisclosedRecipients() as $undisclosedRecipient) { $undisclosedRecipient->Name; $undisclosedRecipient->Email; }

Attachments

``` php foreach($inbound->Attachments() as $attachment) { $attachment->Name; $attachment->ContentType; $attachment->ContentLength; $attachment->Download('/'); //takes directory as first argument }, (*7)

$inbound->HasAttachments();, (*8)


Raw --- ``` php $inbound->Source; //array $inbound->Json; //raw json

Bug tracker

Have a bug? Please create an issue here on GitHub!, (*9)

Contributions

  • Fork
  • Write tests (phpunit in the directory to run the tests)
  • Write Code
  • Pull request

Thanks for your help., (*10)

Authors

Joffrey Jaffeux, (*11)

  • http://twitter.com/joffreyjaffeux
  • http://github.com/jjaffeux

Inspiration

Thx to Randy Schmidt for the original ruby wrapper, (*12)

  • https://github.com/r38y
  • http://forge38.com/

Other libraries

  • Ruby : https://github.com/r38y/postmark-mitt
  • Python : https://github.com/jpadilla/postmark-inbound-python
  • Node : https://gist.github.com/1647808

License

MIT License, (*13)

The Versions

03/04 2013

dev-master

9999999-dev https://github.com/jjaffeux/postmark-inbound-php

Postmark Inbound PHP Wrapper

  Sources   Download

MIT

The Requires

  • php >=5.2

 

api wrapper postmark inbound mails

03/04 2013

3.0.0

3.0.0.0 https://github.com/jjaffeux/postmark-inbound-php

Postmark Inbound PHP Wrapper

  Sources   Download

MIT

The Requires

  • php >=5.2

 

api wrapper postmark inbound mails

26/04 2012

2.1.0

2.1.0.0 https://github.com/jjaffeux/postmark-inbound-php

Postmark Inbound PHP Wrapper

  Sources   Download

MIT

The Requires

  • php >=5.2

 

api wrapper postmark inbound mails

25/04 2012

2.0.0

2.0.0.0 https://github.com/jjaffeux/postmark-inbound-php

Postmark Inbound PHP Wrapper

  Sources   Download

MIT

The Requires

  • php >=5.2

 

api wrapper postmark inbound mails