1
0
mirror of https://github.com/axllent/mailpit.git synced 2024-12-26 22:56:43 +02:00
An email and SMTP testing tool with API for developers
Go to file
Ralph Slooten fd46d4076b Merge tag 'v1.21.8' into develop
Release v1.21.8
2024-12-20 16:48:13 +13:00
.chglog Update Changelog group title order 2024-06-22 23:07:24 +12:00
.github Chore: Bump Go version for automated testing 2024-12-14 18:03:49 +13:00
cmd Chore: Move smtpd & pop3 modules to internal 2024-12-14 17:51:02 +13:00
config Feature: Experimental Unix socket support for HTTPD & SMTPD (#373) 2024-10-24 23:12:34 +13:00
internal Fix(db): Remove unused FOREIGN KEY REFERENCES in message_tags table (#374) 2024-12-20 16:12:40 +13:00
sendmail Feature: Add additional ignored flags to sendmail (#384) 2024-11-08 21:59:20 +13:00
server Chore: Move smtpd & pop3 modules to internal 2024-12-14 17:51:02 +13:00
.dockerignore Feature:: Add multi-arch docker image 2022-08-04 22:51:20 +12:00
.gitignore Theme toggler (#136) 2023-06-30 17:13:12 +12:00
CHANGELOG.md Release v1.21.8 2024-12-20 16:47:58 +13:00
Dockerfile Chore: Upgrade Alpine packages on Docker build 2024-11-10 07:57:45 +13:00
esbuild.config.mjs Chore: Mute Dart Sass deprecation notices 2024-11-16 14:55:35 +13:00
go.mod Chore: Update Go dependencies 2024-12-20 16:14:47 +13:00
go.sum Chore: Update Go dependencies 2024-12-20 16:14:47 +13:00
install.sh Fix typo 2023-01-14 00:31:03 +13:00
LICENSE First commit 2022-07-29 23:23:08 +12:00
main.go Format code 2024-11-22 16:55:24 +13:00
package-lock.json Chore: Update node dependencies 2024-12-20 16:16:43 +13:00
package.json Chore: Update node modules 2024-09-26 17:13:16 +02:00
README.md Update README 2024-03-17 14:59:24 +13:00
SECURITY.md Add security policy 2024-07-23 17:23:56 +12:00

Mailpit - email testing for developers

CI Tests status CI build status CI Docker build status Code quality Go Report Card
Latest release Docker pulls

WebsiteDocumentationAPI


Mailpit is a small, fast, low memory, zero-dependency, multi-platform email testing tool & API for developers.

It acts as an SMTP server, provides a modern web interface to view & test captured emails, and includes an API for automated integration testing.

Mailpit was originally inspired by MailHog which is no longer maintained and hasn't seen active development or security updates for a few years now.

Mailpit

Features

  • Runs entirely from a single static binary or multi-architecture Docker images
  • Modern web UI with advanced mail search to view emails (formatted HTML, highlighted HTML source, text, headers, raw source, and MIME attachments including image thumbnails), including optional HTTPS & authentication
  • SMTP server with optional STARTTLS or SSL/TLS, authentication (including an "accept any" mode)
  • A REST API for integration testing
  • Real-time web UI updates using web sockets for new mail & optional browser notifications when new mail is received
  • Optional POP3 server to download captured message directly into your email client
  • HTML check to test & score mail client compatibility with HTML emails
  • Link check to test message links (HTML & text) & linked images
  • Spam check to test message "spamminess" using a running SpamAssassin server
  • Create screenshots of HTML messages via web UI
  • Mobile and tablet HTML preview toggle in desktop mode
  • Message tagging including manual tagging or automated tagging using filtering and "plus addressing"
  • SMTP relaying (message release) - relay messages via a different SMTP server including an optional allowlist of accepted recipients
  • Fast message storing & processing - ingesting 100-200 emails per second over SMTP depending on CPU, network speed & email size, easily handling tens of thousands of emails, with automatic email pruning (by default keeping the most recent 500 emails)
  • List-Unsubscribe syntax validation
  • Optional webhook for received messages

Installation

The Mailpit web UI listens by default on http://0.0.0.0:8025 and the SMTP port on 0.0.0.0:1025.

Mailpit runs as a single binary and can be installed in different ways:

Install via package managers

  • Mac: brew install mailpit (to run automatically in the background: brew services start mailpit)
  • Arch Linux: available in the AUR as mailpit
  • FreeBSD: pkg install mailpit

Install via bash script (Linux & Mac)

Linux & Mac users can install it directly to /usr/local/bin/mailpit with:

sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh)

Download static binary (Windows, Linux and Mac)

Static binaries can always be found on the releases. The mailpit binary can be extracted and copied to your $PATH, or simply run as ./mailpit.

Docker

See Docker instructions for 386, amd64 & arm64 images.

Compile from source

To build Mailpit from source, see Building from source.

Usage

Run mailpit -h to see options. More information can be seen in the docs.

If installed using homebrew, you may run brew services start mailpit to always run mailpit automatically.

Testing Mailpit

Please refer to the documentation on how to easily test email delivery to Mailpit.

Configuring sendmail

Mailpit's SMTP server (default on port 1025), so you will likely need to configure your sending application to deliver mail via that port. A common MTA (Mail Transfer Agent) that delivers system emails to an SMTP server is sendmail, used by many applications, including PHP. Mailpit can also act as substitute for sendmail. For instructions on how to set this up, please refer to the sendmail documentation.