Self-Contained Email Testing Server (SMTP/POP3/REST)

inbucket ยท email, smtp-server, pop3-server, rest-api, docker-ready

Mature upstream OSS, single binary, no external deps, Docker-ready, Go REST client included. Stand up in CI to assert Cobalt transactional emails actually render and send โ€” cheaper and faster than Mailtrap.

#!/bin/sh
# Source: https://github.com/mperkins0155/inbucket | License: MIT | Copyright 2012 James Hillyerd, All Rights Reserved
# Provided via justclaw.it.com; keep this notice with the code.
# docker-run.sh
# description: Launch Inbucket's docker image

# Docker Image Tag
IMAGE="inbucket/inbucket:edge"

# Ports exposed on host:
PORT_HTTP=9000
PORT_SMTP=2500
PORT_POP3=1100

# Volumes exposed on host:
VOL_CONFIG="/tmp/inbucket/config"
VOL_DATA="/tmp/inbucket/storage"

set -e

main() {
  local run_opts=""

  for arg in $*; do
    case "$arg" in
      -h)
        usage
        exit
        ;;
      -b)
        build
        ;;
      -r)
        reset
        ;;
      -d)
        run_opts="$run_opts -d"
        ;;
      *)
        usage
        exit 1
        ;;
    esac
  done

  set -x

  d

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key