# catchmail

> a sendmail command line replacement for mail testing

Latest version **1.1.0** (published 2015-06-29) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install catchmail
pnpm add catchmail
yarn add catchmail
bun add catchmail
```

Provides the command `catchmail`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-06-29 |
| First published | 2015-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12.0 |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+15 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Xavier Priour |
| Maintainers | xavierpriour |
| Keywords | sendmail, command, cli, command-line, mail, email, e-mail, smtp, test, catch, send |

## Links

- npm: https://www.npmjs.com/package/catchmail
- Repository: https://github.com/xavierpriour/catchmail-node
- Issues: https://github.com/xavierpriour/catchmail-node/issues
- npm.io page: https://npm.io/package/catchmail

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^1.0.0
- [merge](https://npm.io/package/merge.md) ^1.2.0
- [commander](https://npm.io/package/commander.md) ^2.7.1
- [mailparser](https://npm.io/package/mailparser.md) ^0.5.1
- [nodemailer](https://npm.io/package/nodemailer.md) ^1.3.2
- [nodemailer-smtp-transport](https://npm.io/package/nodemailer-smtp-transport.md) ^1.0.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-06-29
- 1.0.1 — 2015-04-15
- 1.0.0 — 2015-04-14

## README

# catchmail-node
A drop-in `sendmail` command line replacement built in Javascript with Node for testing.

It will forward all your mails to a testing SMTP mail catcher
(we recommend [MailDev](https://github.com/djfarrelly/MailDev)).

Use it to test applications that call `sendmail`, like **PHP `mail()`** function:

1. install a test local SMTP mailcatcher like
[MailDev](https://github.com/djfarrelly/MailDev)
or [MailCatcher](https://github.com/sj26/mailcatcher)
2. replace `sendmail` bin with catchmail
(in PHP, add directive: `sendmail_path = /usr/bin/env ./catchmail`)
3. run mail server (`$> maildev`)
4. test your app
5. now all the mails you send appear nicely on http://localhost:1080/

Note that this code is a partial, non-optimized program to ease **testing**.
It is **not** fit for production,
use full blown `sendmail` or its successors.

Inspired 100% by `catchmail` in [MailCatcher](https://github.com/sj26/mailcatcher).

## Install & Run
```
$ npm install -g catchmail
$ catchmail 
```

## Build, test, contribute
You need to have `git` and `node` (v 0.**12** or later) installed 

```
git clone https://github.com/xavierpriour/catchmail-node.git
cd catchmail-node
npm install
grunt test
```

Please add tests with any contribution.
Thanks and enjoy!

---
_Source: https://npm.io/package/catchmail · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
