SMTP capture gateway

Tempx runs a capture-only SMTP server — a sandbox shaped exactly like a real mail server. Your application connects, authenticates and hands over a message as it would with any relay; the gateway stores that message in your Tempx inbox with its original headers intact and never delivers it. Swap two lines of mailer config and your staging environment is incapable of emailing a real customer.

Connection settings

SettingValue
Hostsmtp.tempx.uk
Port587 (STARTTLS) — port 25 also available
EncryptionSTARTTLS (Let's Encrypt certificate)
AuthPLAIN / LOGIN
Usernametmtp_… (from your account, SMTP section)
Passwordshown once when the credential is created
Limits25 recipients / message, 10 MB / message

nodemailer (Node.js)

import nodemailer from "nodemailer";

const transport = nodemailer.createTransport({
  host: "smtp.tempx.uk",
  port: 587,
  secure: false, // STARTTLS, not implicit TLS
  auth: { user: "tmtp_YOUR_USERNAME", pass: "YOUR_PASSWORD" },
});

await transport.sendMail({
  from: "My App <app@example.com>",
  to: "alice@example.com", // any domain - it will NOT be delivered
  subject: "Welcome aboard",
  text: "Your verification code is 427159.",
  html: "<p>Your verification code is <b>427159</b>.</p>",
});
// the message is now in the inbox paired with this credential

Python (smtplib)

import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg["From"] = "My App <app@example.com>"
msg["To"] = "alice@example.com"          # captured, never delivered
msg["Subject"] = "Welcome aboard"
msg.set_content("Your verification code is 427159.")

with smtplib.SMTP("smtp.tempx.uk", 587) as smtp:
    smtp.starttls()
    smtp.login("tmtp_YOUR_USERNAME", "YOUR_PASSWORD")
    smtp.send_message(msg)

Quick terminal check (swaks)

swaks --to alice@example.com \
  --server smtp.tempx.uk:587 \
  --auth LOGIN --auth-user tmtp_YOUR_USERNAME --auth-password YOUR_PASSWORD \
  --tls --header "Subject: Capture check" --body "Hello from swaks"

Laravel / framework .env

Any framework that speaks SMTP takes the same four values:

MAIL_MAILER=smtp
MAIL_HOST=smtp.tempx.uk
MAIL_PORT=587
MAIL_USERNAME=tmtp_YOUR_USERNAME
MAIL_PASSWORD=YOUR_PASSWORD
MAIL_ENCRYPTION=tls

Capture semantics worth knowing

Mint a credential and send one

Create a tmtp_ credential, point your mailer at the gateway, and watch the capture land.

Open your account

Related