https://github.com/axllent/mailpit Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} axllent / mailpit Public * * Notifications * Fork 35 * Star 1.4k An email and SMTP testing tool with API for developers License MIT license 1.4k stars 35 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Wiki * Security * Insights axllent/mailpit This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. develop Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 2 branches 76 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/a] Use Git or checkout with SVN using the web URL. [gh repo clone axllen] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @axllent axllent Libs: Update Go modules ... 1ed0616 Jun 19, 2023 Libs: Update Go modules 1ed0616 Git stats * 577 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .chglog Update git-chglog format March 10, 2023 14:52 .github Increase auto-build package upload retries from 3 to 5 June 14, 2023 22:33 cmd Fix: Only display sendmail help when sendmail subcommand is invoked June 15, 2023 09:50 config Feature: Set tags via X-Tags message header June 2, 2023 14:47 docs Update API docs May 31, 2023 08:20 sendmail Rename hidden long flags June 7, 2023 07:35 server Libs: Upgrade node modules June 19, 2023 16:27 storage API: Sort tags before saving June 13, 2023 16:57 utils Feature: Set tags via X-Tags message header June 2, 2023 14:47 .dockerignore Feature:: Add multi-arch docker image August 4, 2022 22:51 .gitignore Update .gitignore June 3, 2023 10:34 CHANGELOG.md Release v1.6.21 June 15, 2023 22:25 Dockerfile Docker: Expose default ports (1025/tcp 8025/tcp) March 9, 2023 15:49 LICENSE First commit July 29, 2022 23:23 README.md Update README May 23, 2023 16:07 esbuild.config.mjs Feature: OpenAPI / Swagger schema March 31, 2023 18:44 go.mod Libs: Update Go modules June 19, 2023 20:22 go.sum Libs: Update Go modules June 19, 2023 20:22 install.sh Fix typo January 14, 2023 00:31 main.go Fix: Normalize running binary name detection (Windows) September 21, 2022 15:56 package-lock.json Libs: Upgrade node modules June 19, 2023 16:27 package.json Libs: Upgrade node modules June 19, 2023 16:27 View code [ ] Mailpit - email testing for developers Features Installation Install via Brew (Mac) Install via bash script (Linux & Mac) Download static binary (Windows, Linux and Mac) Docker Compile from source Testing Mailpit Configuring sendmail Why rewrite MailHog? README.md Mailpit - email testing for developers Tests Build status Docker builds CodeQL Go Report Card Mailpit is a multi-platform email testing tool & API for developers. It acts as both an SMTP server, and provides a web interface to view all captured emails. Mailpit is inspired by MailHog, but much, much faster. Mailpit Features * Runs entirely from a single binary, no installation required * SMTP server (default 0.0.0.0:1025) * Web UI to view emails (formatted HTML, highlighted HTML source, text, headers, raw source and MIME attachments including image thumbnails) * Mobile and tablet HTML preview toggle in desktop mode * Advanced mail search (see wiki) * Message tagging (see wiki) * Real-time web UI updates using web sockets for new mail * Optional browser notifications for new mail (HTTPS and localhost only) * Configurable automatic email pruning (default keeps the most recent 500 emails) * Email storage either in a temporary or persistent database (see wiki) * Fast SMTP processing & storing - approximately 70-100 emails per second depending on CPU, network speed & email size, easily handling tens of thousands of emails * SMTP relaying / message release - relay messages via a different SMTP server including an optional allowlist of accepted recipients (see wiki) * Optional SMTP with STARTTLS & SMTP authentication, including an "accept anything" mode (see wiki) * Optional HTTPS for web UI (see wiki) * Optional basic authentication for web UI (see wiki) * A simple REST API (see docs) * Multi-architecture Docker images 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 Brew (Mac) Add the repository to your taps with brew tap axllent/apps, and then install Mailpit with brew 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 extracted and copied to your $PATH, or simply run as ./ mailpit. Docker See Docker instructions. Compile from source To build Mailpit from source see building from source. Testing Mailpit Please refer to the documentation of how to easily test email delivery to Mailpit. Configuring sendmail Mailpit's SMTP server (by 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 a SMTP server is sendmail, used by many applications including PHP. Mailpit can also act as substitute for sendmail. For instructions of how to set this up, please refer to the sendmail documentation. Why rewrite MailHog? I had been using MailHog for a few years to intercept and test emails generated from several projects. MailHog has a number of performance issues, many of the frontend and Go modules are horribly out of date, and it is not actively developed. Initially I tried to upgrade a fork of MailHog (both the UI as well as the HTTP server & API), but soon discovered that it is (with all due respect to its authors) poorly designed. It is in my opinion over-engineered (split over 9 separate projects), and performs very poorly when dealing with large amounts of emails or processing emails with an attachments (a single email with a 3MB attachment can take over a minute to ingest). Finally, the API transmits a lot of duplicate and unnecessary data on every browser request, and there is no HTTP compression. In order to improve it I felt it needed to be completely rewritten, and so Mailpit was born. About An email and SMTP testing tool with API for developers Topics go golang smtp-server email-testing Resources Readme License MIT license Stars 1.4k stars Watchers 3 watching Forks 35 forks Report repository Releases 76 v1.6.21 Latest Jun 15, 2023 + 75 releases Sponsor this project Sponsor Learn more about GitHub Sponsors Contributors 11 * @axllent * @dependabot[bot] * @mfechner * @shizunge * @lupinitylabs * @Corvan * @tomjepp * @KaptinLin * @richieri * @gliwka * @jonaskuske Languages * Go 65.0% * Vue 26.3% * SCSS 3.6% * JavaScript 3.1% * Shell 0.9% * HTML 0.9% * Dockerfile 0.2% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.