PHPackages                             peehaa/mailgrab - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. peehaa/mailgrab

ActiveProject[Mail &amp; Notifications](/categories/mail)

peehaa/mailgrab
===============

Self contained mail catcher for debugging purposes

v0.3.0(8y ago)94313[7 issues](https://github.com/PeeHaa/mailgrab/issues)MITJavaScriptPHP ^7.1

Since Apr 19Pushed 6y ago7 watchersCompare

[ Source](https://github.com/PeeHaa/mailgrab)[ Packagist](https://packagist.org/packages/peehaa/mailgrab)[ RSS](/packages/peehaa-mailgrab/feed)WikiDiscussions master Synced 2w ago

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

MailGrab
========

[](#mailgrab)

[![Latest Stable Version](https://camo.githubusercontent.com/90a399581a178305e1b9aae833209d10119d8012fb4693dc638beaa9e83634b0/68747470733a2f2f706f7365722e707567782e6f72672f7065656861612f6d61696c677261622f762f737461626c65)](https://packagist.org/packages/peehaa/mailgrab)[![Build Status](https://camo.githubusercontent.com/8ad4cc1f9448a6b06cbaa1b2591b007f09836b703d66518554a47c603dbc25f2/68747470733a2f2f7472617669732d63692e6f72672f5065654861612f6d61696c677261622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PeeHaa/mailgrab)[![Build status](https://camo.githubusercontent.com/a70156ea236be60d1abfdfeab80198707684ca3633b1d1c7560a01fdad41efb6/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f30766732337662376f687975786a71722f6272616e63682f6d61737465723f7376673d74727565)](https://ci.appveyor.com/project/PeeHaa/mailgrab/branch/master)[![Coverage Status](https://camo.githubusercontent.com/72a2b1d5ac3b96b31ca4d2a636ffc42d4206881a533eb109f3d607cbb23725f3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5065654861612f6d61696c677261622f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/PeeHaa/mailgrab?branch=master)[![License](https://camo.githubusercontent.com/b31fe5c038fcb94b88a9021343c39e3776a355a53a7747bdcff38fee715c01f1/68747470733a2f2f706f7365722e707567782e6f72672f7065656861612f6d61696c677261622f6c6963656e7365)](https://packagist.org/packages/peehaa/mailgrab)

Catch-all SMTP server for local debugging purposes.

This SMTP server catches all e-mail being sent through it and provides an interface to inspect the e-mails.

*Note: this SMTP server is meant to be run locally. As such several security considerations (e.g. SMTP transaction delays) have been omitted by design. Never run this project as a public service.*

[![Screenshot MailGrab](https://camo.githubusercontent.com/5dc49eccac9a31f1970bfad6fa71a912dc5d1fb0999ba5ee3ea4fda3d73398c8/68747470733a2f2f692e696d6775722e636f6d2f4539714131734b2e706e67 "Screenshot")](https://camo.githubusercontent.com/5dc49eccac9a31f1970bfad6fa71a912dc5d1fb0999ba5ee3ea4fda3d73398c8/68747470733a2f2f692e696d6775722e636f6d2f4539714131734b2e706e67)

Project status
--------------

[](#project-status)

This project is currently working towards a first stable release version.
The master branch of this project will always be in a functioning state and will always point to the last release.

All active development should be based off the v0.4.0 branch.

### Current limitations

[](#current-limitations)

- Currently the project only supports unauthenticated smtp requests (without `AUTH` command)
- No persistent storage
- Because we currently only support in-memory storage the project may run out of memory when handling a lot of mails or mails with a lot attachments

Requirements
------------

[](#requirements)

- PHP 7.1

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

[](#installation)

### Composer

[](#composer)

```
composer create-project peehaa/mailgrab

```

### Phar

[](#phar)

Download the latest phar file from the [releases](https://github.com/PeeHaa/mailgrab/releases) page.

Usage
-----

[](#usage)

### Composer

[](#composer-1)

`./bin/mailgrab` will start MailGrab using the default configuration:

- HTTP port: 9000
- SMTP port: 9025

*See `./bin/mailgrab --help` for more configuration options*

Once the MailGrab server is started you can point your browser to `http://localhost:9000` to access the webinterface.
If you send a mail to the server over port 9025 it will automatically be displayed in the webinterface.
There are example mail scripts available under `./examples` (e.g. `php examples/full-test.php`) which you can run to test the functionality.

### Phar

[](#phar-1)

`/path/to/mailgrab.phar` will start MailGrab using the default configuration:

- HTTP port: 9000
- SMTP port: 9025

*See `/path/to/mailgrab.phar --help` for more configuration options*

Build and development
---------------------

[](#build-and-development)

### NPM

[](#npm)

To get started run `npm install`.

An NPM build script is provided and can be used by running `npm run build` in the project root.

### Building phars

[](#building-phars)

Currently all active development has to be based off the v0.4.0 branch.

If you want to build a phar you can run the build script located at `./bin/build` which will create a new build in the `./build` directory.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

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 ~1 days

Total

7

Last Release

2988d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce6ea4ee501375bd1be563f6deed94e889d57d6134e98486208e5bcd14026ec2?d=identicon)[PeeHaa](/maintainers/PeeHaa)

---

Top Contributors

[![PeeHaa](https://avatars.githubusercontent.com/u/1330296?v=4)](https://github.com/PeeHaa "PeeHaa (171 commits)")

---

Tags

amphpasyncdebuggingmailmailcatchersmtpsmtp-server

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/peehaa-mailgrab/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.5k](/packages/laravel-framework)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k885.1k22](/packages/danog-madelineproto)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.6k154.8k](/packages/jason-munro-cypht)[directorytree/imapengine

A fully-featured IMAP library -- without the PHP extension

551243.6k8](/packages/directorytree-imapengine)[frosh/mail-platform-archive

Mail Archive

22224.9k](/packages/frosh-mail-platform-archive)[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

125.1k1](/packages/markocupic-calendar-event-booking-bundle)

PHPackages © 2026

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