Coder Social home page Coder Social logo

super-rain / mailpit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from axllent/mailpit

0.0 1.0 0.0 1.14 MB

An email and SMTP testing tool with API for developers

License: MIT License

Shell 0.86% JavaScript 3.07% Go 63.04% HTML 0.84% Vue 28.51% Dockerfile 0.17% SCSS 3.50%

mailpit's Introduction

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. It also contains an API for automated integration testing.

Mailpit is inspired by MailHog, but modern and 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)
  • Light & dark web UI theme with auto-detect
  • 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 for 386, amd64 & arm64 images.

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, but experienced a number of severe performance issues. Many of the frontend and Go libraries are very out of date, and the project is no longer maintained.

Initially I tried to upgrade a fork of MailHog (the UI, the HTTP server and the API), but discovered that it is (with all due respect to its authors) far too complex. I found it over-engineered (split over 9 separate projects), and performs very poorly when dealing with large amounts of emails or emails with attachments (a single email with a 3MB attachment can take over a minute to ingest). Finally the API transmits a lot of duplicate & irrelevant data on every browser request, all without any HTTP compression.

In order to improve it I felt it needed to be completely rewritten, and so Mailpit was born.

mailpit's People

Contributors

axllent avatar dependabot[bot] avatar shizunge avatar jonaskuske avatar jrmessias avatar kaptinlin avatar corvan avatar mfechner avatar gliwka avatar lupinitylabs avatar richieri avatar thomasjepp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.