PHPackages                             andrifix/email-reply-trimmer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. andrifix/email-reply-trimmer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andrifix/email-reply-trimmer
============================

PHP port of Ruby email\_reply\_trimmer

v1.2.1(1y ago)0240MITPHPPHP &gt;=8.3

Since Apr 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/andrifix/php-reply-trimmer)[ Packagist](https://packagist.org/packages/andrifix/email-reply-trimmer)[ RSS](/packages/andrifix-email-reply-trimmer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Email Reply Trimmer
===================

[](#email-reply-trimmer)

This is a port of the [discourse/email\_reply\_trimmer](https://github.com/discourse/email_reply_trimmer) library. It's a small library to trim replies from plain text email.

Install
=======

[](#install)

Install via Composer:

```
composer require andrifix/email-reply-trimmer
```

Usage
=====

[](#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.";
}
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance48

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

2

Last Release

382d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/416872f4404449b7bddf526930092da0f5928cd8785cc04d11f1143759e85349?d=identicon)[andrifix](/maintainers/andrifix)

---

Top Contributors

[![andrifix](https://avatars.githubusercontent.com/u/207614438?v=4)](https://github.com/andrifix "andrifix (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andrifix-email-reply-trimmer/health.svg)

```
[![Health](https://phpackages.com/badges/andrifix-email-reply-trimmer/health.svg)](https://phpackages.com/packages/andrifix-email-reply-trimmer)
```

###  Alternatives

[droptica/droopler

Droopler - SEO Friendly CMS &amp; Site Builder - is a Drupal-based website builder that helps you create beautiful, fast, and easy-to-manage websites

6543.1k1](/packages/droptica-droopler)[facebook/facebook-for-magento

Facebook For Magento

852.0k](/packages/facebook-facebook-for-magento)[sinergi/token

PHP library to generate random strings

188.7k9](/packages/sinergi-token)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
