sendity/email-channel
最新稳定版本:v0.1.2
Composer 安装命令:
composer require sendity/email-channel
包简介
Framework-agnostic Sendity inbound email channel for raw RFC822 messages, DKIM verification, MIME parsing, and code extraction.
README 文档
README
Framework-agnostic PHP package for Sendity inbound email verification.
sendity/email-channel accepts raw RFC822/MIME messages from an SMTP transport, verifies DKIM sender-domain alignment with dachs/mail-auth, parses message content with an established MIME parser, extracts Sendity authentication codes through the sendity/core AuthCodeServiceInterface contract, and returns a normalized email-channel result.
Boundaries
This package intentionally contains no Laravel/server glue and no persistence/session matching. sendity/laravel-server is responsible for wiring this package into the application, mapping the normalized result into server-side verification flows, and handling storage/events/jobs.
Dependencies on sendity/core are limited to contracts/interfaces. The package does not depend on Sendity server internals.
Basic usage
use Dachs\MailAuth\DkimVerifier;
use Sendity\Core\Contract\AuthCodeServiceInterface;
use Sendity\EmailChannel\EmailChannel;
use Sendity\EmailChannel\SmtpEnvelopeContext;
/** @var AuthCodeServiceInterface $authCodeService */
$channel = new EmailChannel(
authCodeService: $authCodeService,
dkimVerifier: new DkimVerifier(),
);
$result = $channel->processRawMessage(
rawMessage: $rawRfc822Message,
context: new SmtpEnvelopeContext(
recipient: 'login@sendity.io',
mailFrom: $smtpMailFrom,
remoteAddress: $smtpRemoteAddress,
),
);
if ($result->status === \Sendity\EmailChannel\EmailProcessingStatus::Verified) {
// Hand off $result->sender, $result->codes and $result->identityData to the server glue.
}
Verification policy
A verified result requires:
- raw message size within
EmailChannelOptions::$maxMessageBytes - DKIM verification pass via
dachs/mail-auth - DKIM signing domain aligned with the visible
Fromdomain - parseable MIME content
- visible sender email address
- at least one extractable Sendity code
DMARC is intentionally not enforced here; this matches the current Sendity email-inbound MVP contract.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-11