Preview: SendMock has no stable release yet. These docs follow develop.
SendMock

Install

Every way to install SendMock, from install scripts and package managers to Docker and binaries.

Only the beta is published so far. Use the Beta command of each way below; the stable commands work from 1.0.0. The npm packages (npx, bunx and npm install) follow with the next beta.

SendMock is one static binary with the web UI built in. Pick one way to install it below and follow its steps; all of them run the same thing.

Every way has a stable build (from main) and a beta build (from develop, with the newest features first). Use one or the other. The beta has its own docs; see Docs versions.

Which way to choose

Every way below installs the same sendmock. The table says which systems each one serves and whether it has the stable, the beta or both.

Way to installSystemsStableBeta
npxmacOS, Linux, WindowsYesYes
bunxmacOS, Linux, WindowsYesYes
HomebrewmacOS, LinuxYesYes
Install script (Linux and macOS)macOS, LinuxYesYes
Install script (Windows)WindowsYesYes
aptLinuxYesYes
dnfLinuxYesYes
NixLinux, macOSYesNo
ScoopWindowsYesYes
WinGetWindowsYesNo
ChocolateyWindowsYesNo
npmmacOS, Linux, WindowsYesYes
CargomacOS, Linux, WindowsYesNo
DockermacOS, Linux, WindowsYesYes
BinariesmacOS, Linux, WindowsYesYes

Running one SendMock for a team or a CI cluster? The Helm chart runs it in Kubernetes: see Kubernetes. Docker Desktop users can add the Docker Desktop extension instead of a docker run line. To try a change before it is released, download a test build from its pull request.

npx (no install)

Run SendMock straight from npm without installing anything first. You need Node.js 18 or newer (or Bun, pnpm or Yarn). The first run downloads the binary for your computer (under 20 MB) into the package manager's cache; later runs start at once.

  1. Start the stable:

    npx sendmock

    Or the beta:

    npx sendmock@beta
  2. Any command works the same way, for example the MCP server for an AI agent:

    npx sendmock mcp
  3. With another package manager, use its runner instead of npx:

    bunx sendmock
    pnpm dlx sendmock
    yarn dlx sendmock

Then go on to Start SendMock.

bunx (no install)

Run SendMock straight from npm with Bun, without installing anything first. You need Bun. The first run downloads the binary for your computer (under 20 MB) into Bun's cache; later runs start at once.

  1. Start the stable:

    bunx sendmock

    Or the beta:

    bunx sendmock@beta
  2. Any command works the same way, for example the MCP server for an AI agent:

    bunx sendmock mcp

Then go on to Start SendMock.

Homebrew (macOS and Linux)

  1. Install SendMock.

    Stable:

    brew install shibbirweb/tap/sendmock

    Beta:

    brew install shibbirweb/tap/sendmock-beta
  2. Check that it is installed:

    sendmock --version
  3. Go on to Start SendMock.

Prefer to download the binary yourself? Go to Binaries.

Install script (Linux and macOS)

The script downloads the right binary from the latest GitHub release, checks its checksum and puts sendmock on your PATH.

  1. Run the install script.

    Stable:

    curl -fsSL https://github.com/shibbirweb/sendmock/releases/latest/download/install.sh | sh

    Beta:

    curl -fsSL https://github.com/shibbirweb/sendmock/releases/download/beta/install.sh | sh -s -- --channel beta

    It puts sendmock in ~/.local/bin and adds that folder to your shell's profile. Add --install-dir <folder> to choose another folder, or --no-modify-path to leave your profile as it is.

  2. Open a new terminal window, so it picks up the new PATH.

  3. Check that it is installed:

    sendmock --version
  4. Go on to Start SendMock.

Prefer to download the binary yourself? Go to Binaries.

Install script (Windows)

  1. Open PowerShell.

  2. Run the install script.

    Stable:

    irm https://github.com/shibbirweb/sendmock/releases/latest/download/install.ps1 | iex

    Beta:

    & ([scriptblock]::Create((irm https://github.com/shibbirweb/sendmock/releases/download/beta/install.ps1))) -Channel beta

    It puts sendmock.exe in %LOCALAPPDATA%\Programs\sendmock and adds that folder to your user Path. To choose another folder, run it as a script block with -InstallDir <folder>; add -NoModifyPath to leave your Path as it is.

  3. Close PowerShell and open a new window, so it picks up the new PATH.

  4. Check that it is installed:

    sendmock --version
  5. Go on to Start SendMock.

Prefer to download the binary yourself? Go to Binaries.

apt (Debian and Ubuntu)

Our signed repository keeps SendMock up to date with the rest of your system.

  1. Add the repository's signing key:

    sudo install -d -m 0755 /etc/apt/keyrings
    curl -fsSL https://shibbirweb.github.io/sendmock/packages/sendmock.gpg | sudo tee /etc/apt/keyrings/sendmock.gpg > /dev/null
  2. Add the repository.

    Stable:

    echo "deb [signed-by=/etc/apt/keyrings/sendmock.gpg] https://shibbir.me/sendmock/packages/apt stable main" | sudo tee /etc/apt/sources.list.d/sendmock.list

    Beta:

    echo "deb [signed-by=/etc/apt/keyrings/sendmock.gpg] https://shibbir.me/sendmock/packages/apt beta main" | sudo tee /etc/apt/sources.list.d/sendmock.list
  3. Install SendMock:

    sudo apt update
    sudo apt install sendmock
  4. Check that it is installed, then go on to Start SendMock:

    sendmock --version

sudo apt upgrade installs new releases. Each release also attaches the .deb file, for sudo apt install ./sendmock_<version>_amd64.deb without the repository.

dnf (Fedora, RHEL and similar)

  1. Add the repository.

    Stable:

    sudo curl -fsSL -o /etc/yum.repos.d/sendmock.repo https://shibbirweb.github.io/sendmock/packages/sendmock-stable.repo

    Beta:

    sudo curl -fsSL -o /etc/yum.repos.d/sendmock.repo https://shibbirweb.github.io/sendmock/packages/sendmock-beta.repo
  2. Install SendMock. The first time, dnf asks you to accept the repository's signing key:

    sudo dnf install sendmock
  3. Check that it is installed, then go on to Start SendMock:

    sendmock --version

sudo dnf upgrade installs new releases. Each release also attaches the .rpm file, for sudo dnf install ./sendmock-<version>.x86_64.rpm without the repository.

Nix

Nixpkgs has the stable once its maintainers have merged it.

  1. Run SendMock without installing it:

    nix run nixpkgs#sendmock
  2. Or install it into your profile:

    nix profile install nixpkgs#sendmock
  3. Go on to Start SendMock.

Scoop (Windows)

  1. Add the SendMock bucket:

    scoop bucket add shibbirweb https://github.com/shibbirweb/scoop-bucket
  2. Install SendMock.

    Stable:

    scoop install shibbirweb/sendmock

    Beta:

    scoop install shibbirweb/sendmock-beta
  3. Check that it is installed:

    sendmock --version
  4. Go on to Start SendMock.

WinGet (Windows)

WinGet is built into Windows 10 and 11. It has the stable only.

  1. Install SendMock:

    winget install shibbirweb.sendmock
  2. Open a new PowerShell window and check that it is installed:

    sendmock --version
  3. Go on to Start SendMock. winget upgrade shibbirweb.sendmock installs new releases.

Chocolatey (Windows)

Chocolatey has the stable only. A new version appears there once Chocolatey's moderators approve it, which can take a few days.

  1. Install SendMock from an administrator PowerShell:

    choco install sendmock
  2. Check that it is installed:

    sendmock --version
  3. Go on to Start SendMock. choco upgrade sendmock installs new releases.

npm (projects with Node.js)

The sendmock package runs the right binary for your computer, so a JavaScript project can keep SendMock in its dev dependencies and start it in CI.

  1. Add it to your project.

    Stable:

    npm install --save-dev sendmock

    Beta:

    npm install --save-dev sendmock@beta
  2. Check that it runs:

    npx sendmock --version
  3. Start it with npx sendmock, or add "sendmock": "sendmock" to your scripts. Then go on to Start SendMock.

Cargo (Rust developers)

The stable comes from crates.io and builds from source, with the web UI already inside. There is no beta here; use another way for the beta.

  1. Install SendMock:

    cargo install sendmock --locked
  2. Check that it is installed:

    sendmock --version
  3. Go on to Start SendMock.

Docker

  1. Start the container.

    Stable:

    docker run --rm -p 1025:1025 -p 8025:8025 ghcr.io/shibbirweb/sendmock

    Beta:

    docker run --rm -p 1025:1025 -p 8025:8025 ghcr.io/shibbirweb/sendmock:beta
  2. Open the web UI at http://127.0.0.1:8025.

  3. Point your app's SMTP settings at host 127.0.0.1, port 1025. Connect your app has the settings for each language.

The same image is also on Docker Hub: shibbirweb/sendmock.

Good to know:

  • Inside Docker, SendMock listens on 0.0.0.0 so the published ports work. Outside Docker it listens on 127.0.0.1 only.
  • Captured mail and SMS live in the container's /data folder. With --rm they are gone when the container stops; use Docker Compose below to keep them.
  • To connect an app that also runs in Docker, see Connect your app: Docker.

Docker Desktop extension

The extension runs SendMock inside Docker Desktop and adds a SendMock tab that shows whether it is running and opens the web UI. SMTP is on localhost:1025 and the web UI on http://localhost:8025, as with docker run. Each release publishes it on GitHub's container registry, and each version runs the SendMock of the same version.

  1. Install it into Docker Desktop (answer y when Docker asks to confirm an extension that is not from its Marketplace):

    docker extension install ghcr.io/shibbirweb/sendmock-docker-extension:latest
  2. Open SendMock in Docker Desktop's sidebar, then Open SendMock.

For a beta, use its version as the tag instead of latest, for example ghcr.io/shibbirweb/sendmock-docker-extension:0.1.0-beta.1.

To try changes that are not released yet, build it from a clone of the repository:

  1. Get the repository:

    git clone https://github.com/shibbirweb/sendmock.git
  2. Go into it:

    cd sendmock
  3. Build the extension image:

    docker build -t sendmock-docker-extension:0.0.1 packaging/docker-desktop
  4. Install it into Docker Desktop:

    docker extension install sendmock-docker-extension:0.0.1
  5. Open SendMock in Docker Desktop's sidebar, then Open SendMock.

To remove it, run docker extension rm sendmock-docker-extension; its data volume stays until you delete it.

Docker Compose

Use this to keep SendMock running with captured mail and SMS kept across restarts.

  1. In your project folder, create a file named compose.yaml:

    services:
      sendmock:
        image: ghcr.io/shibbirweb/sendmock
        ports:
          - "1025:1025"
          - "8025:8025"
        volumes:
          - sendmock-data:/data
    
    volumes:
      sendmock-data:

    For the beta, change the image line to:

    image: ghcr.io/shibbirweb/sendmock:beta
  2. Start it:

    docker compose up
  3. Open the web UI at http://127.0.0.1:8025.

To run SendMock next to your app in the same Compose project, or for CI, webhooks and seed files, see Connect your app: Docker.

Install with AI

Let your AI coding agent (Claude Code, Codex, Cursor, Gemini CLI or another one that can run commands) install SendMock for you. It checks your computer first, asks you a few simple questions and shows every command before it runs it.

  1. Open your AI agent in a terminal on the computer where SendMock should run, and allow it to run commands.

  2. Copy this prompt and paste it into the agent:

    Install SendMock on this computer for me. SendMock is a local sandbox that catches the emails, SMS and webhooks my apps send: https://shibbirweb.github.io/sendmock/
    
    Follow these steps and talk to me in plain, simple words:
    
    1. Before you install anything, check this computer and tell me what you found: the operating system and CPU (for example macOS on Apple silicon, Windows on x64, Linux on ARM), whether Docker is installed and running, whether Homebrew is installed, whether Node.js (`node --version`) or Bun (`bun --version`) is installed, and whether SendMock is already installed (`sendmock --version`).
    
    2. Ask me how I want to run SendMock, and recommend one based on what you found:
       - Docker: SendMock runs in a container, nothing is installed on my computer, and it is easy to remove. Good if I already use Docker or Docker Compose. Docker must be running.
       - npx or bunx: runs SendMock straight from npm with nothing installed. Needs Node.js 18 or newer (npx) or Bun (bunx); the first run downloads it into their cache, later runs start at once. Good for trying SendMock, or if I already use Node.js or Bun.
       - The binary: one small program installed on my computer. It starts instantly and does not need Docker.
    
    3. Ask me whether I want the stable version (recommended) or the beta (newest features first).
    
    4. Use only these official commands, for my choice and my system:
       - macOS or Linux with Homebrew, stable: `brew install shibbirweb/tap/sendmock`
       - macOS or Linux with Homebrew, beta: `brew install shibbirweb/tap/sendmock-beta`
       - Linux or macOS without Homebrew, stable: `curl -fsSL https://github.com/shibbirweb/sendmock/releases/latest/download/install.sh | sh`
       - Linux or macOS without Homebrew, beta: `curl -fsSL https://github.com/shibbirweb/sendmock/releases/download/beta/install.sh | sh -s -- --channel beta`
       - Windows (PowerShell), stable: `irm https://github.com/shibbirweb/sendmock/releases/latest/download/install.ps1 | iex`
       - Windows (PowerShell), beta: `& ([scriptblock]::Create((irm https://github.com/shibbirweb/sendmock/releases/download/beta/install.ps1))) -Channel beta`
       - npx (Node.js), stable: `npx sendmock`
       - npx (Node.js), beta: `npx sendmock@beta`
       - bunx (Bun), stable: `bunx sendmock`
       - bunx (Bun), beta: `bunx sendmock@beta`
       - Docker, stable: `docker run --rm -p 1025:1025 -p 8025:8025 ghcr.io/shibbirweb/sendmock`
       - Docker, beta: `docker run --rm -p 1025:1025 -p 8025:8025 ghcr.io/shibbirweb/sendmock:beta`
       The full steps are on https://shibbirweb.github.io/sendmock/docs/install/. Before you run each command, show it to me, say in one sentence what it does, and wait for my OK.
    
    5. If a download fails because SendMock has no release yet, stop and tell me so. I can try the live demo instead: https://shibbirweb.github.io/sendmock/demo/
    
    6. When it is installed, start SendMock so it keeps running after you finish (in the background, or give me the command to run in a new terminal; with npx or bunx, that command is the one that starts it), and check that it works: open http://127.0.0.1:8025. Then tell me the web UI address, the SMTP settings for my app (host 127.0.0.1, port 1025, no username, password or TLS) and how to stop SendMock.
    
    Do not change any other settings on this computer, and ask me before you install anything else.
  3. Answer its questions: Docker, npx or bunx, or the binary, and stable or beta. Approve each command once you have read what it does.

Binaries

  1. Download the archive for your system. The links always point at the newest stable or beta build.

    SystemArchiveStableBeta
    macOS, Apple siliconsendmock-aarch64-apple-darwin.tar.gzDownloadDownload
    macOS, Intelsendmock-x86_64-apple-darwin.tar.gzDownloadDownload
    Windows, x64sendmock-x86_64-pc-windows-msvc.zipDownloadDownload
    Windows, Arm64sendmock-aarch64-pc-windows-msvc.zipDownloadDownload
    Linux, x64 (static)sendmock-x86_64-unknown-linux-musl.tar.gzDownloadDownload
    Linux, Arm64 (static)sendmock-aarch64-unknown-linux-musl.tar.gzDownloadDownload
  2. Unpack it.

    macOS and Linux:

    tar -xzf sendmock-*.tar.gz

    Windows (PowerShell):

    Expand-Archive -Path .\sendmock-*.zip -DestinationPath .\sendmock
  3. Put sendmock on your PATH.

    macOS and Linux:

    sudo mv sendmock /usr/local/bin/

    Windows (PowerShell), then open a new window:

    $userPath = [Environment]::GetEnvironmentVariable("Path", "User")
    [Environment]::SetEnvironmentVariable("Path", "$userPath;$PWD\sendmock", "User")
  4. If you downloaded the archive with a web browser, let your system run it. The builds are not signed with an Apple Developer ID or a Windows code-signing certificate yet, so macOS and Windows hold back a downloaded copy the first time. Homebrew, the install scripts, Scoop, WinGet, Chocolatey, npx and bunx do not need this step.

    On macOS ("Apple could not verify sendmock is free of malware"), remove the download mark once:

    xattr -d com.apple.quarantine /usr/local/bin/sendmock

    Or run sendmock once, then open System Settings > Privacy & Security and click Open Anyway.

    On Windows ("Windows protected your PC" when you open it), choose More info, then Run anyway, or remove the download mark once in PowerShell:

    Unblock-File .\sendmock\sendmock.exe
  5. Check that it is installed:

    sendmock --version
  6. Go on to Start SendMock.

Every release also has a SHA256SUMS file to check the download, and older versions are on the releases page.

Try a build that is not released yet

Every pull request, and every change merged into develop or main, builds SendMock for each system above, tests each build on its own system, and keeps it on the workflow run: 14 days for a pull request, 30 days for develop and main. Use one to try a change before it is released. These builds report the dev channel and are not for everyday use.

  1. Sign in to GitHub. Downloading a build from a workflow run needs a GitHub account (any account works).

  2. Find the build.

    For a pull request, open it and find the comment Test builds of followed by the commit. It lists each system with a download link, the size and the SHA-256.

    For develop or main, open the Test builds workflow, choose the newest run on that branch, and find the same list in its summary.

  3. Download the build for your system (named as in the Binaries table, for example sendmock-aarch64-apple-darwin), then unzip the download. It holds the archive and its .sha256 file.

    Or download it with the GitHub CLI, which unzips it for you, using the run's number from its address:

    gh run download <run id> --repo shibbirweb/sendmock --name sendmock-aarch64-apple-darwin
  4. Check the archive against its .sha256 file.

    macOS and Linux:

    shasum -a 256 -c sendmock-*.sha256

    Windows (PowerShell), where both lines must show the same value:

    (Get-FileHash .\sendmock-*.zip -Algorithm SHA256).Hash.ToLower()
    (Get-Content .\sendmock-*.zip.sha256).Split(" ")[0]
  5. Unpack it as in step 2 of Binaries.

  6. On macOS, remove the download mark from the unpacked binary:

    xattr -d com.apple.quarantine ./sendmock

    On Windows, if "Windows protected your PC" appears, choose More info, then Run anyway.

  7. Check that it is the test build. It prints the version and the dev channel:

    ./sendmock --version

    On Windows, run .\sendmock\sendmock.exe --version.

  8. Start it with an in-memory database, so it stays apart from the data of a SendMock you have installed:

    ./sendmock serve --db memory

    If an installed SendMock is already running, stop it first, since both use ports 1025 and 8025.

sendmock-tray puts SendMock in the macOS menu bar or the Windows and Linux system tray. It uses the SendMock already running at http://127.0.0.1:8025, or starts sendmock serve itself, and its menu shows the status and the unread email and SMS counts, opens the web UI, starts and stops the server it started, and quits (stopping only a server it started). It needs SendMock installed (any way above) and Rust to build.

  1. On Linux only, install the libraries the tray uses (Debian and Ubuntu shown):

    sudo apt-get install -y libgtk-3-dev libxdo-dev libayatana-appindicator3-dev
  2. Install the tray app:

    cargo install sendmock-tray --features gui --locked
  3. Start it:

    sendmock-tray
  4. Click the envelope in the menu bar or tray. On macOS the unread total shows next to it.

To watch another address, start it with sendmock-tray --url http://127.0.0.1:9000; to start a particular binary, add --sendmock /path/to/sendmock. A server the tray starts keeps its data where sendmock always does.

Start SendMock

After installing with Homebrew, an install script or a binary:

  1. Start the server:

    sendmock
  2. Open the web UI at http://127.0.0.1:8025.

  3. Optional: in a second terminal, check that it is healthy:

    sendmock health
  4. Point your app's SMTP settings at host 127.0.0.1, port 1025. Connect your app has the settings for each language.

To look around before your app sends anything, start it with sample data instead: sendmock --demo fills an empty instance with the emails, SMS, webhooks, catcher bins and payments the live demo shows. An instance that already holds data is left as it is.

On this page