PHPackages                             zbateson/php-dummy-sendmail - 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. zbateson/php-dummy-sendmail

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

zbateson/php-dummy-sendmail
===========================

sendmail dummy for testing written in PHP

1.0.0(7y ago)2541BSD-3-ClausePHP

Since Jan 7Pushed 7y agoCompare

[ Source](https://github.com/zbateson/php-dummy-sendmail)[ Packagist](https://packagist.org/packages/zbateson/php-dummy-sendmail)[ Docs](https://github.com/zbateson/php-dummy-sendmail)[ RSS](/packages/zbateson-php-dummy-sendmail/feed)WikiDiscussions master Synced 3d ago

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

zbateson/php-dummy-sendmail
===========================

[](#zbatesonphp-dummy-sendmail)

sendmail dummy for testing written in PHP

PHP based 'sendmail' dummy for writing emails to a directory for testing.

- Predictable and configurable file-naming
- Configurable output directory and file extension

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

[](#installation)

Currently, installing involves either creating the phar archive from the repo, or running it directly from the repo.

Dependencies must be downloaded and installed with composer - to do so:

```
composer install
```

> This depends on how composer is installed, if that fails please ensure composer is installed and review composer's documentation at:

To create the phar archive, after cloning, use clue/phar-composer and run phar-composer build to create php-dummy-sendmail.phar. Once created, optionally move it to /usr/local/bin or configure sendmail with php path/to/php-dummy-sendmail.phar.

```
mv php-dummy-sendmail.phar /usr/local/bin/php-sendmail
```

> clue/phar-composer will automatically set execute permissions. you may need to run this with sudo

To run directly without creating a phar archive, the main project file sendmail, is an executable file in bash and can be run with:

```
php sendmail
```

In Windows php-dummy-sendmail can be run with:

```
php sendmail

```

### Configure php.ini

[](#configure-phpini)

Change the sendmail configuration in php.ini:

```
sendmail = /usr/local/bin/php-sendmail --directory /path/to/output-dir

```

Usage
-----

[](#usage)

php-sendmail \[--directory\[="..."\]\] \[--timestamp\[="..."\]\] \[--increment-file\[="..."\]\] \[--input-file\[="..."\]\] \[--file-extension\[="..."\]\] \[--print\] \[to\]

Example: php-sendmail  --directory /path/to/output/dir --timestamp "Y-m-d H:i:s:u" --file-extension txt

> php-sendmail reads from STDIN by default, so the above example run on the command line would block.

### Command-line Options

[](#command-line-options)

\--directory - specifies the default directory to read/write to (useful if not the current dir)

\--timestamp - PHP date() timestamp format (with 'u' support), used to format the output file name. Defaults to 'Y-m-d H:i:s:u'

\--increment-file - Specifies a file to save an index number for auto-increment functionality. File names are numbered with this option set.

\--file-extension - Sets the file extension to use for saved files.

\--input-file - Specify an input file (useful for debugging)

\--print - Simply prints the output

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

2684d ago

### Community

Maintainers

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

---

Top Contributors

[![zbateson](https://avatars.githubusercontent.com/u/8356974?v=4)](https://github.com/zbateson "zbateson (7 commits)")

---

Tags

testingsendmailPHP mail

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zbateson-php-dummy-sendmail/health.svg)

```
[![Health](https://phpackages.com/badges/zbateson-php-dummy-sendmail/health.svg)](https://phpackages.com/packages/zbateson-php-dummy-sendmail)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)

PHPackages © 2026

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