>_ emailblackhole

Getting started

1. Get your settings

Open the sandbox. You get, instantly and without signing up:

Host smtp.emailblackhole.io
Port 2525
Security STARTTLS (the connection is upgraded to TLS; the certificate is a normal, verifiable one)
Username a short random id, for example k3x9w2m8q1
Password a random secret, hidden until you press Show
Public address temp_<your id>@mail.emailblackhole.io

The page also shows ready-made snippets with your real values already filled in. Keep the page open: new mail appears in it the moment it arrives, without reloading.

2. Send mail from your app

Use the settings like any SMTP server. Only the credentials are special: they belong to your session, and any recipient address is accepted, because nothing is delivered.

Node.js (nodemailer):

import nodemailer from 'nodemailer'

const transport = nodemailer.createTransport({
  host: 'smtp.emailblackhole.io',
  port: 2525,
  secure: false,        // start in plain text, then upgrade...
  requireTLS: true,     // ...and refuse to continue if the upgrade fails
  auth: { user: 'YOUR_ID', pass: 'YOUR_SECRET' },
})

await transport.sendMail({
  from: 'app@example.com',
  to: 'new.user@example.com',
  subject: 'Verify your account',
  text: 'Your code is 482913',
})

Python (standard library):

import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg["From"], msg["To"], msg["Subject"] = "app@example.com", "new.user@example.com", "Verify your account"
msg.set_content("Your code is 482913")

with smtplib.SMTP("smtp.emailblackhole.io", 2525) as s:
    s.starttls()
    s.login("YOUR_ID", "YOUR_SECRET")
    s.send_message(msg)

From the shell (swaks):

swaks --server smtp.emailblackhole.io:2525 --tls --auth PLAIN \
  --auth-user YOUR_ID --auth-password YOUR_SECRET \
  --to anyone@example.com --h-Subject "Hello" --body "It works"

Most frameworks have the same four settings (host, port, STARTTLS, user and password) in their mail configuration, usually as environment variables such as SMTP_HOST, SMTP_PORT, SMTP_USER and SMTP_PASS.

3. Or receive real mail at the public address

Your session also has an address, temp_<your id>@mail.emailblackhole.io. It behaves like any other mailbox on the internet: a real service can send to it. Use it to test a third-party signup, a payment provider's receipts, or your production mail setup end to end.

4. Read the mail

Each message has tabs for the rendered HTML, the text, the links found in it, any verification codes (4 to 8 digits next to a word like "code"), the headers, the raw source and the attachments.

HTML mail is shown in a locked box: scripts never run, and images from the internet are blocked until you choose to load them, so opening a hostile or tracking email is safe.

Next