jjaffeux/postmark-inbound-php
最新稳定版本:3.0.1
Composer 安装命令:
composer require jjaffeux/postmark-inbound-php
包简介
Postmark Inbound PHP Wrapper
README 文档
README
This is a simple API wrapper for Postmark Inbound Hook (http://developer.postmarkapp.com/developer-inbound-webhook.html)
Setup
With composer :
{
"require": {
"jjaffeux/postmark-inbound-php": ">=3.0"
}
}
$inbound = new \Postmark\Inbound(file_get_contents('php://input'));
Without composer :
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'));
General Usage
$inbound->Subject(); $inbound->FromEmail(); $inbound->FromFull(); $inbound->FromName(); $inbound->Date(); $inbound->OriginalRecipient(); $inbound->ReplyTo(); $inbound->MailboxHash(); $inbound->Tag(); $inbound->MessageID(); $inbound->TextBody(); $inbound->HtmlBody(); $inbound->StrippedTextReply();
Headers
$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');
Recipients and Undisclosed Recipients
foreach($inbound->Recipients() as $recipient) { $recipient->Name; $recipient->Email; } foreach($inbound->UndisclosedRecipients() as $undisclosedRecipient) { $undisclosedRecipient->Name; $undisclosedRecipient->Email; }
Attachments
foreach($inbound->Attachments() as $attachment) { $attachment->Name; $attachment->ContentType; $attachment->ContentLength; $attachment->Download('/'); //takes directory as first argument } $inbound->HasAttachments();
Raw
$inbound->Source; //array $inbound->Json; //raw json
Bug tracker
Have a bug? Please create an issue here on GitHub!
Contributions
- Fork
- Write tests (phpunit in the directory to run the tests)
- Write Code
- Pull request
Thanks for your help.
Authors
Joffrey Jaffeux
Inspiration
Thx to Randy Schmidt for the original ruby wrapper
Other libraries
- Ruby : https://github.com/r38y/postmark-mitt
- Python : https://github.com/jpadilla/postmark-inbound-python
License
MIT License
jjaffeux/postmark-inbound-php 适用场景与选型建议
jjaffeux/postmark-inbound-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 834.23k 次下载、GitHub Stars 达 97, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「wrapper」 「postmark」 「inbound」 「mails」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jjaffeux/postmark-inbound-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jjaffeux/postmark-inbound-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jjaffeux/postmark-inbound-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Library to send email across all platforms using one interface.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
Provides an email provider for postmarkapp.com
A minor update of Miguel Perez's no-longer maintained code from https://github.com/miguel250/PostmarkBundle to allow for Symfony 3 compatibility. All credit/kudos/thanks for the work should obviously go to him
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 834.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 98
- 点击次数: 31
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04