Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
complete refactoring v2.0, see changelog.md
- Loading branch information
Showing
22 changed files
with
608 additions
and
2,700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: php | ||
script: make test | ||
script: phpunit | ||
|
||
php: | ||
- 5.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CHANGELOG | ||
========= | ||
|
||
v 2.0 | ||
----- | ||
|
||
Complete refactoring | ||
- Travis | ||
- Enhance -> Phpunit | ||
- Autoload | ||
- Composer | ||
- Consitent API | ||
- New Postmark JSON fields | ||
|
||
|
||
v 1.0 | ||
----- | ||
|
||
Initial release | ||
- Features | ||
- Tests | ||
- Examples |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2010 Joffrey Jaffeux | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "jjaffeux/postmark-inbound-php", | ||
"type": "library", | ||
"description": "Postmark Inbound PHP Wrapper", | ||
"version": "2.0", | ||
"homepage": "https://github.com/jjaffeux/postmark-inbound-php", | ||
"keywords": ["postmark", "inbound", "wrapper", "api", "mails"], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Joffrey Jaffeux", | ||
"email": "j.jaffeux@gmail.com", | ||
"homepage": "http://www.twitter.com/joffreyjaffeux" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.2" | ||
}, | ||
"autoload": { | ||
"psr-0": { "Postmark_": "lib/" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
require_once '../lib/Postmark/Autoloader.php'; | ||
\Postmark\Autoloader::register(); | ||
|
||
// this file should be the target of the callback you set in your postmark account | ||
//$inbound = new \Postmark\Inbound(file_get_contents('php://input')); | ||
$inbound = new \Postmark\Inbound(file_get_contents('../fixtures/inbound.json')); | ||
|
||
echo $inbound->Subject(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"From": "myUser@theirDomain.com", | ||
"FromFull": { | ||
"Email": "myUser@theirDomain.com", | ||
"Name": "John Doe" | ||
}, | ||
"To": "451d9b70cf9364d23ff6f9d51d870251569e+ahoy@inbound.postmarkapp.com", | ||
"ToFull": [ | ||
{ | ||
"Email": "451d9b70cf9364d23ff6f9d51d870251569e+ahoy@inbound.postmarkapp.com", | ||
"Name": "" | ||
}, | ||
{ | ||
"Email": "451d9b70cf9364d23ff025154f870251569e+ahoy@inbound.postmarkapp.com", | ||
"Name": "Ian Tofull" | ||
} | ||
], | ||
"Cc": "\"Full name\" , \"Another Cc\" ", | ||
"CcFull": [ | ||
{ | ||
"Email": "sample.cc@emailDomain.com", | ||
"Name": "Full name" | ||
}, | ||
{ | ||
"Email": "another.cc@emailDomain.com", | ||
"Name": "Another Cc" | ||
} | ||
], | ||
"ReplyTo": "myUsersReplyAddress@theirDomain.com", | ||
"Subject": "This is an inbound message", | ||
"MessageID": "22c74902-a0c1-4511-804f2-341342852c90", | ||
"Date": "Thu, 5 Apr 2012 16:59:01 +0200", | ||
"MailboxHash": "ahoy", | ||
"TextBody": "[ASCII]", | ||
"HtmlBody": "[HTML(encoded)]", | ||
"Tag": "awesome", | ||
"Headers": [ | ||
{ | ||
"Name": "X-Spam-Checker-Version", | ||
"Value": "SpamAssassin 3.3.1 (2010-03-16) onrs-ord-pm-inbound1.wildbit.com" | ||
}, | ||
{ | ||
"Name": "X-Spam-Status", | ||
"Value": "No" | ||
}, | ||
{ | ||
"Name": "X-Spam-Score", | ||
"Value": "-0.1" | ||
}, | ||
{ | ||
"Name": "X-Spam-Tests", | ||
"Value": "DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_PASS" | ||
}, | ||
{ | ||
"Name": "Received-SPF", | ||
"Value": "Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.160.180; helo=mail-gy0-f180.google.com; envelope-from=myUser@theirDomain.com; receiver=451d9b70cf9364d23ff6f9d51d870251569e+ahoy@inbound.postmarkapp.com" | ||
}, | ||
{ | ||
"Name": "DKIM-Signature", | ||
"Value": "v=1; a=rsa-sha256; c=relaxed\/relaxed; d=wildbit.com; s=google; h=mime-version:reply-to:date:message-id:subject:from:to:cc :content-type; bh=cYr\/+oQiklaYbBJOQU3CdAnyhCTuvemrU36WT7cPNt0=; b=QsegXXbTbC4CMirl7A3VjDHyXbEsbCUTPL5vEHa7hNkkUTxXOK+dQA0JwgBHq5C+1u iuAJMz+SNBoTqEDqte2ckDvG2SeFR+Edip10p80TFGLp5RucaYvkwJTyuwsA7xd78NKT Q9ou6L1hgy\/MbKChnp2kxHOtYNOrrszY3JfQM=" | ||
}, | ||
{ | ||
"Name": "MIME-Version", | ||
"Value": "1.0" | ||
}, | ||
{ | ||
"Name": "Message-ID", | ||
"Value": "<CAGXpo2WKfxHWZ5UFYCR3H_J9SNMG+5AXUovfEFL6DjWBJSyZaA@mail.gmail.com>" | ||
} | ||
], | ||
"Attachments": [ | ||
{ | ||
"Name": "myimage.png", | ||
"Content": "[BASE64-ENCODED CONTENT]", | ||
"ContentType": "image/png", | ||
"ContentLength": 4096 | ||
}, | ||
{ | ||
"Name": "mypaper.doc", | ||
"Content": "[BASE64-ENCODED CONTENT]", | ||
"ContentType": "application/msword", | ||
"ContentLength": 16384 | ||
} | ||
] | ||
} |
Oops, something went wrong.