Based on Mailhog.
- Download and run MailCage
- Configure your outgoing SMTP server
- View your outgoing email in a web UI
- Release it to a real mail server
Built with Go - MailCage runs without installation on multiple platforms.
MailCage is an email testing tool for developers:
- Configure your application to use MailCage for SMTP delivery
- View messages in the web UI, or retrieve them with the JSON API
- Optionally release messages to real SMTP servers for delivery
- ESMTP server implementing RFC5321
- Support for SMTP AUTH (RFC4954) and PIPELINING (RFC2920)
- Web interface to view messages (plain text, HTML or source)
- Real-time updates using EventSource
- Release messages to real SMTP servers
- HTTP API to list, retrieve and delete messages
- HTTP basic authentication for MailHog UI and API
- Multipart MIME support
- Download individual MIME parts
- In-memory message storage
- Lightweight and portable
- No installation required
The most simple way to run the application:
$ docker run --rm ns3777k/mailcage
Just download the corresponding binary from releases and run it :-)
My company and I have been using mailhog
for quite a while, but it's poorly maintained now.
I made MailCage
on top of mailhog
with the goal of actively maintaining it.
Maildir
is replaced withsqlite
- One single repository
- Frontend is rewritten in React
- Improved logging
- Some bugs fixed
- More docs
- Proper error handling
- Mail downloads
- Tests
- Search
mcsendmail is a sendmail replacement for MailCage, a fork of mhsendmail.
It redirects mail to MailCage using SMTP.
Alternatively, you can use your native sendmail
command by providing -S
, for example:
$ /usr/sbin/sendmail -S mail:1025
For example, in PHP you could add either of these lines to php.ini
:
sendmail_path = /usr/local/bin/mcsendmail
sendmail_path = /usr/sbin/sendmail -S mail:1025
Sample usage:
mcsendmail test@mailcage.local <<EOF
To: Test <test@mailcage.local>
From: Nikita <ns3777k@gmail.com>
Subject: Test message
Some content!
EOF