Use case
A mistyped address means a user who never gets your welcome email, and a disposable one often means free-tier abuse. Checking at signup catches both while the person is still on the page.
Rejecting everything that is not deliverable loses real customers. This is a sensible default for most products.
Set a short timeout and let the signup through if the check fails. An outage in any third-party service should not stop people joining your product.
async function shouldBlock(email) {
try {
const url = new URL("https://app.veridock.io/v1/verify");
url.searchParams.set("email", email);
url.searchParams.set("timeout", "3000");
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.VERIDOCK_API_KEY}` },
signal: AbortSignal.timeout(4000),
});
if (!res.ok) return false;
const { status, reason } = await res.json();
return status === "undeliverable" || reason === "disposable";
} catch {
return false;
}
}Verification shows that a mailbox can receive mail. A confirmation link shows that this person controls it. Use verification first so that the confirmation email actually arrives and does not bounce.
FAQ
250 free checks every month, forever. Upgrade when you outgrow them.