How to block disposable email signups
Fake accounts made with temporary email addresses burn through free tiers, skew your metrics and damage your email reputation. Here's how to stop them at signup without turning away real users.
1. Decide what to block
- Disposable (mailinator.com, 10minutemail.com, yopmail.com, …): block.
- Undeliverable (domain doesn't exist or can't receive mail): reject and ask the user to fix a typo.
- Suspicious: allow, but require email verification before giving away credits or trials.
- Free providers and relays (Gmail, Outlook, Apple Hide My Email, Firefox Relay): allow. These are real people.
2. Check the address on your server
Call the check when the account is created and whenever the email changes. Keep the API key on the server, use a short timeout and let the signup through if the check fails.
Node.js
async function isBlockedEmail(email) {
try {
const r = await fetch(
"https://api.burnerapi.com/v1/check?email=" + encodeURIComponent(email),
{ headers: { Authorization: `Bearer ${process.env.BURNERAPI_KEY}` },
signal: AbortSignal.timeout(3000) });
if (!r.ok) return false; // fail open
const { verdict } = await r.json();
return verdict === "disposable" || verdict === "undeliverable";
} catch { return false; }
}
Python
import os, requests
def is_blocked_email(email: str) -> bool:
try:
r = requests.get("https://api.burnerapi.com/v1/check",
params={"email": email},
headers={"Authorization": f"Bearer {os.environ['BURNERAPI_KEY']}"},
timeout=3)
r.raise_for_status()
return r.json()["verdict"] in ("disposable", "undeliverable")
except requests.RequestException:
return False # fail open
PHP
function is_blocked_email(string $email): bool {
$ch = curl_init("https://api.burnerapi.com/v1/check?email=" . urlencode($email));
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 3,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("BURNERAPI_KEY")],
]);
$body = curl_exec($ch);
$ok = curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200;
curl_close($ch);
if (!$ok) return false; // fail open
$verdict = json_decode($body, true)["verdict"] ?? "valid";
return in_array($verdict, ["disposable", "undeliverable"], true);
}
3. Show a helpful message
Tell the user what to do instead of a generic error: "Please use a permanent email address. Temporary inboxes can't receive your account emails." For undeliverable domains, suggest checking for a typo.
4. Clean up existing accounts
Run your current user list through the batch endpoint (up to 100 addresses per call) to find accounts that were created with disposable addresses, then ask them to update their email or limit what they can do.
Why not just use a blocklist?
Open-source blocklists are a reasonable start, but they go stale quickly as temporary email services register new domains every day, and they occasionally include real providers. An API that is kept current saves you from maintaining the list and from blocking real customers by mistake. You can try any address with the free disposable email checker.
Check every signup automatically
The BurnerAPI REST API returns a verdict in milliseconds. 1,000 free checks a month, no card required.
Get a free API key Read the docsQuestions
Should I block all free email providers too?
Usually not. Gmail, Outlook and similar providers belong to real people. Block disposable domains, and use the free_provider flag only if you sell to businesses and want a work address.
What should happen if the check times out?
Let the signup through. A short timeout (2 to 5 seconds) and failing open means an outage on any side never blocks real customers.
Where should I run the check?
On your server, when the account is created and whenever the user changes their email. Never put your API key in browser code.