erwane/whep-postal
最新稳定版本:2.2.0
Composer 安装命令:
composer require erwane/whep-postal
包简介
Postal webhooks handler
README 文档
README
Webhook handler for postal emailing provider.
Usage
composer require erwane/whep-postal
use WHEP\Exception\IpException; use WHEP\Exception\ProviderException; use WHEP\Factory; try { $provider = Factory::provider('postal', [ 'allowed_ip' => ['my.postal.server.ipv4', 'my:postal:server::ipv6'], 'client_ip' => $_SERVER['REMOTE_ADDR'] ?? null, // Use method from your framework to get the ServerRequest client ip. 'callbacks' => [ ProviderInterface::EVENT_BLOCKED => [$this, 'callbackInvalidate'], ProviderInterface::EVENT_BOUNCE_QUOTA => [$this, 'callbackUnsub'], ], ]); // process the data. $provider->process($webhookData); // Data available from provider getters. $recipient = $provider->getRecipient(); // Launch callbacks $provider->callback(); } catch (IpException $e) { // log ? } catch (ProviderException $e) { // log ? }
See WHEP Client README for options and getters methods.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-03