PHPackages                             tomi0/mailhog-api-testing - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. tomi0/mailhog-api-testing

ActiveLibrary[Testing &amp; Quality](/categories/testing)

tomi0/mailhog-api-testing
=========================

Mailhog testing api.

4.0.3(6mo ago)218.2k↓31.7%MITPHPPHP ^7.3|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4

Since Oct 29Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Tomi0/mailhog-api-testing)[ Packagist](https://packagist.org/packages/tomi0/mailhog-api-testing)[ RSS](/packages/tomi0-mailhog-api-testing/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (0)

Mailhog Api Testing
===================

[](#mailhog-api-testing)

Test that your emails are sent

Install
-------

[](#install)

```
composer require tomi0/mailhog-api-testing

```

Usage
-----

[](#usage)

Use Mailhog testing trait in your test:

```
use Mailhog\MailhogTesting;

class ClassName {
    use MailhogTesting;
    ...
}
```

Set up environment:

```
$this->setUpMailhogEnviroment($host, $smtpPort, $webPort, $isHttps);
```

Available methods:

```
// Check if message exsits (return bool)
$this->messageExistsByContent($content);
$this->messageExists($content);

// Get all messages (return EmailMessage[])
$this->getAllMessages();

// Clear inbox (return bool)
$this->clearInbox();
$this->emptyInbox();
```

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance66

Regular maintenance activity

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% 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 ~182 days

Recently: every ~309 days

Total

9

Last Release

201d ago

Major Versions

1.3.2 → 2.0.02023-02-21

2.0.0 → 3.0.02024-03-28

3.0.0 → 4.0.02025-10-29

PHP version history (5 changes)1.0PHP ^7.4

1.3.1PHP ^7.4|^8.0|^8.1

2.0.0PHP ^7.3|^7.4|^8.0|^8.1|^8.2

3.0.0PHP ^7.3|^7.4|^8.0|^8.1|^8.2|^8.3

4.0.0PHP ^7.3|^7.4|^8.0|^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/890f040f615b90d7e57c43b52197cae47eded8a78cc7153ebd2973534492fa64?d=identicon)[tomi0](/maintainers/tomi0)

---

Top Contributors

[![Tomi0](https://avatars.githubusercontent.com/u/28013422?v=4)](https://github.com/Tomi0 "Tomi0 (29 commits)")[![TBuendia](https://avatars.githubusercontent.com/u/148842095?v=4)](https://github.com/TBuendia "TBuendia (1 commits)")

---

Tags

emailmailhogtestingtestingapimailhog

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tomi0-mailhog-api-testing/health.svg)

```
[![Health](https://phpackages.com/badges/tomi0-mailhog-api-testing/health.svg)](https://phpackages.com/packages/tomi0-mailhog-api-testing)
```

###  Alternatives

[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[imbo/behat-api-extension

API extension for Behat

1082.5M9](/packages/imbo-behat-api-extension)[davidhsianturi/laravel-compass

An elegant REST assistent for the Laravel framework.

1.3k84.5k](/packages/davidhsianturi-laravel-compass)

PHPackages © 2026

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