andrifix/email-reply-trimmer
最新稳定版本:v1.2.1
Composer 安装命令:
composer require andrifix/email-reply-trimmer
包简介
PHP port of Ruby email_reply_trimmer
README 文档
README
This is a port of the discourse/email_reply_trimmer library. It's a small library to trim replies from plain text email.
Install
Install via Composer:
composer require andrifix/email-reply-trimmer
Usage
To trim replies:
$trimmed_body = EmailReplyTrimmer::trim($email_body);
You can also split the trimmed content and the elided part (the removed reply):
[$trimmedBody, $elidedContent] = EmailReplyTrimmer::trim($emailBody, true);
To extract the first embedded email section:
$extracted = EmailReplyTrimmer::extractEmbeddedEmail($emailBodyWithEmbedded); if ($extracted) { [$embeddedEmail, $beforeEmbedded] = $extracted; echo "Text Before Embedded Email: $beforeEmbedded\n"; echo "Embedded Email $embeddedEmail:\n"; } else { echo "No embedded email found."; }
统计信息
- 总下载量: 238
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-14