PHPackages                             rpkamp/mailhog-client - 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. [API Development](/categories/api)
4. /
5. rpkamp/mailhog-client

ActiveLibrary[API Development](/categories/api)

rpkamp/mailhog-client
=====================

Mailhog API Client for PHP

2.0.2(12mo ago)24763.0k↓46.7%16[3 issues](https://github.com/rpkamp/mailhog-client/issues)5MITPHPPHP ^8.1CI failing

Since Nov 11Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/rpkamp/mailhog-client)[ Packagist](https://packagist.org/packages/rpkamp/mailhog-client)[ RSS](/packages/rpkamp-mailhog-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (14)Versions (27)Used By (5)

Mailhog API Client for PHP [![Packagist Version](https://camo.githubusercontent.com/3fabdf717309460e7d908df7d60c0d21c86797840478451205f69a9f828756af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72706b616d702f6d61696c686f672d636c69656e74)](https://camo.githubusercontent.com/3fabdf717309460e7d908df7d60c0d21c86797840478451205f69a9f828756af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72706b616d702f6d61696c686f672d636c69656e74)
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#mailhog-api-client-for-php-)

A simple PHP (8.1+) client for [Mailhog](https://github.com/mailhog/MailHog).

Design Goals
------------

[](#design-goals)

- As little dependencies as possible
- Simple single client for both Mailhog V1 API as well as Mailhog V2 API
- Integration tests on all endpoints, both happy path and failure paths

Installation
------------

[](#installation)

This package does not require any specific HTTP client implementation, but is based on [HTTPlug](https://github.com/php-http/httplug), so you can inject your own HTTP client of choice. So you when you install this library make sure you either already have an HTTP client installed, or install one at the same time as installing this library, otherwise installation will fail.

```
composer require rpkamp/mailhog-client
```

For more information please refer to the [HTTPlug documentation for Library Users](http://docs.php-http.org/en/latest/httplug/users.html).

Usage
-----

[](#usage)

```
