PHPackages                             mrstacy/html2mht - 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. mrstacy/html2mht

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

mrstacy/html2mht
================

Convert Html into MHT archive

1.0.0(8y ago)3221proprietaryPHPPHP ^7.1CI failing

Since May 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mrstacy/html2mht)[ Packagist](https://packagist.org/packages/mrstacy/html2mht)[ RSS](/packages/mrstacy-html2mht/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

HTML 2 MHT
==========

[](#html-2-mht)

This is a library to convert an html page into an MHT archive.

Dependencies
------------

[](#dependencies)

PHP &gt;=7.1

Install library via composer:
-----------------------------

[](#install-library-via-composer)

```
composer require mrstacy/html2mht

```

Usage:
------

[](#usage)

```
$html2mht = new Html2Mht();
$html2mht->generateMhtFile();

```

Running Tests locally:
----------------------

[](#running-tests-locally)

In project root run the following to run tests

```
php vendor/phpunit/phpunit/phpunit

```

Known Issues:
-------------

[](#known-issues)

- This only runs against local html files (not a URL)
- This does not include files that aren't linked directly from the main html file (IE: If an image is linked in the css file, it won't be included)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

2954d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32468346?v=4)[Stacy Robinson](/maintainers/mrstacy)[@mrstacy](https://github.com/mrstacy)

---

Top Contributors

[![mrstacy](https://avatars.githubusercontent.com/u/32468346?v=4)](https://github.com/mrstacy "mrstacy (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mrstacy-html2mht/health.svg)

```
[![Health](https://phpackages.com/badges/mrstacy-html2mht/health.svg)](https://phpackages.com/packages/mrstacy-html2mht)
```

###  Alternatives

[spatie/laravel-directory-cleanup

This package will remove the expired files from the given directories.

3061.5M7](/packages/spatie-laravel-directory-cleanup)

PHPackages © 2026

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