Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

catchmail

xavierpriour7MITdeprecated1.1.0

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

a sendmail command line replacement for mail testing

sendmail, command, cli, command-line, mail, email, e-mail, smtp, test, catch, send

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).

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

  1. install a test local SMTP mailcatcher like MailDev or 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.

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!

changelog

Release History

1.1.0

  • parses email header text and uses it: mail appears as it would to client

1.0.1

  • Bug fix: mail text now picked from stdIn, not argument

1.0.0

  • Initial release.