Inboxes.Run
InboxAPI / IMAPHelp
Sign in

Automation guide · CI/CD

Temporary email for CI/CD and end-to-end tests

Provision an inbox at test runtime instead of maintaining shared test accounts. Your CI job creates the address, runs the workflow, reads the email, and lets the mailbox expire after the test.

Good CI use cases

  • Signup and onboarding tests.
  • Password-reset delivery tests.
  • Email verification and OTP flows.
  • Smoke tests against a deployed staging environment.
  • Regression tests that need isolated inboxes for parallel workers.

Python runner example

import json, os, time, urllib.request
API = "https://inboxes.run/api/v1"
KEY = os.environ["INBOXESRUN_API_KEY"]

def call(path, method="GET", body=None):
    data = None if body is None else json.dumps(body).encode()
    req = urllib.request.Request(API + path, data=data, method=method, headers={
        "Authorization": f"Bearer {KEY}",
        "Content-Type": "application/json",
    })
    with urllib.request.urlopen(req) as response:
        return json.load(response)

box = call("/mailboxes", "POST", {})
print("address:", box["address"])

while True:
    messages = call(f"/mailboxes/{box['id']}/messages")
    print(json.dumps(messages, indent=2))
    time.sleep(3)

CI configuration

Store INBOXESRUN_API_KEY as a protected CI secret. Create a mailbox inside the test job rather than committing addresses or credentials into the repository. The API base is https://inboxes.run/api/v1.

When this is different from MailHog or Mailpit

Local SMTP capture is ideal for tests that control the sending server. Inboxes.Run is useful when you want the test to receive mail through an externally reachable mailbox and exercise more of the real delivery path.

Lifecycle

A normal temporary mailbox lives for 24 hours. Treat it as disposable test infrastructure, not permanent storage or an account recovery address.

Temp Mail APIPlaywrightOTP & magic linksCI/CDAI agents

Try it

Open a temporary inbox in the browser for free. For programmatic use, sign in and open API / IMAP to generate an API key and see the current limits.

Open Inboxes.Run · API / IMAP

HelpTermsPrivacyAUP