Skip to content

How to verify an email address without sending an email

· 7 min read · Email validation

You can verify an email address without sending an email by running four checks in order: syntax, domain existence in DNS, an MX record lookup, and an SMTP conversation with the domain's mail server that stops at RCPT TO, before any message is transmitted. The first three tell you whether the address could ever receive mail. The fourth asks the server whether this specific mailbox exists, and the server usually answers honestly. The gap is catch-all domains, which accept every recipient, and servers that defer or block probes: for those, no check short of real mail gives you a yes.

The four layers, and what each one proves

Each layer is cheaper than the next and filters out a different kind of bad address. Run them in order and stop at the first definite failure.

Layer What you check What a failure proves What a pass proves
Syntax Local part, @, domain shape The address can't be routed Almost nothing
Domain DNS answer for the domain Nobody can receive mail there The domain is registered
MX MX records, or the A fallback The domain doesn't accept mail A server claims to accept mail
SMTP RCPT TO The server's reply for this mailbox The mailbox doesn't exist (if the reply is clear) The server will accept mail for it (or for anything)

The mistake people make is treating a pass at any layer as "valid". Only the SMTP layer says anything about the mailbox, and even that comes with caveats.

Step 1: check the syntax, but not with a giant regex

Syntax checking catches typos like missing @, spaces, trailing dots and jane@gmail with no TLD. It cannot tell you whether jane@gmail.com is a real person. RFC 5321 allows local parts up to 64 octets and a full path up to 256, and technically allows quoted local parts that nobody uses in practice. A practical check is: one @, a non-empty local part without spaces, and a domain with at least one dot and valid labels.

Don't try to encode the full RFC grammar. It accepts things you don't want and the edge cases waste your time. We explain why in email regex is not enough. Do lowercase the domain and convert internationalized domains to punycode before the next step, or your DNS lookups will fail on perfectly good addresses like those covered in IDN and punycode email domains.

Step 2: check that the domain exists

Query DNS for the domain. An NXDOMAIN answer means the domain isn't registered or has lapsed, so every address at it is undeliverable. This catches old company domains after an acquisition, typos that land on unregistered names, and made-up addresses like test@asdfqwer.com.

Be careful with errors that aren't NXDOMAIN. A SERVFAIL or a timeout means the resolver couldn't get an answer, not that the domain is gone. Treat those as "unknown, retry later", never as invalid.

Step 3: look up the MX record

The MX record tells you which host accepts mail for the domain. Three outcomes matter:

  1. MX records exist. Sort by preference (lowest first) and use the top host for the SMTP step.
  2. No MX, but an A or AAAA record. RFC 5321 section 5.1 says to treat the domain itself as the mail host (the "implicit MX"). Plenty of small domains rely on this.
  3. A null MX (MX 0 .). RFC 7505 defines this as the domain explicitly saying "I accept no mail". Every address is undeliverable.

Here is a Node.js version using the built-in resolver:

// mx-check.mjs  (Node 18+)
import { resolveMx, resolve4 } from 'node:dns/promises';

export async function mailHost(domain) {
  try {
    const mx = await resolveMx(domain);
    if (mx.length === 1 && mx[0].exchange === '') return { ok: false, reason: 'null_mx' };
    mx.sort((a, b) => a.priority - b.priority);
    return { ok: true, host: mx[0].exchange };
  } catch (err) {
    if (err.code === 'ENOTFOUND') return { ok: false, reason: 'no_domain' };
    if (err.code === 'ENODATA') {
      // No MX: fall back to the A record (implicit MX)
      try {
        await resolve4(domain);
        return { ok: true, host: domain };
      } catch {
        return { ok: false, reason: 'no_mx' };
      }
    }
    return { ok: null, reason: 'dns_error' }; // SERVFAIL, timeout: don't call it invalid
  }
}

console.log(await mailHost(process.argv[2]));
node mx-check.mjs stripe.com

Checking MX records to see if a domain can receive email goes further into the edge cases. At this point you know the domain can receive mail. You still know nothing about jane@.

Step 4: ask the mail server with RCPT TO, then hang up

SMTP lets a client name the recipient before sending any content. The server replies to RCPT TO with a code, and many servers check the recipient at that moment. So a verifier opens a session, gets as far as RCPT TO, reads the reply and sends QUIT. The DATA command, which carries the message, never runs. Nothing lands in anyone's inbox.

A typical exchange looks like this (S: is the server, C: the client):

S: 220 mx.example.com ESMTP
C: EHLO probe.yourdomain.com
S: 250-mx.example.com
C: MAIL FROM:<check@yourdomain.com>
S: 250 2.1.0 OK
C: RCPT TO:<jane@example.com>
S: 250 2.1.5 OK
C: QUIT
S: 221 2.0.0 Bye

The reply to RCPT TO is the answer. Roughly:

  • 250 means the server will accept mail for that recipient.
  • 550 5.1.1 (or similar wording like "user unknown") means the mailbox doesn't exist.
  • 552 or 5.2.2 means the mailbox exists but is full.
  • 450, 451 or 421 means "try later", often greylisting or rate limiting. You learned nothing about the mailbox.
  • 550 5.7.1 and other policy codes usually mean the server rejected you, the prober, not the recipient.

We list the codes and what to do with each in SMTP bounce codes explained.

Why not use the VRFY command, which exists for exactly this? Because almost every public mail server disables it or answers 252 ("cannot verify, but will accept"), since it hands spammers a directory lookup. RCPT TO is the only practical route.

You probably can't run this from your app server

Outbound port 25 is blocked by default on most cloud platforms and residential connections. Even where it's open, receiving servers judge the connecting IP: no reverse DNS, a shared cloud range or a bad reputation gets you timeouts and policy rejections that look like failures but say nothing about the mailbox. Probes also need care: a burst of RCPT TO checks against one provider from one IP looks like a directory-harvest attack and gets the IP listed.

That's why pingutil runs its SMTP step from a separate prober host with its own IP, reverse DNS and per-domain budgets, instead of from the Cloudflare Worker that serves the API (Workers can't open port 25 at all).

The catch-all problem

Some domains accept every recipient at RCPT TO, real or not. A probe for jane@ and one for zz-not-real-8812@ both get 250. On those domains a 250 proves nothing.

The standard workaround is to probe a random address that can't exist first. If the server accepts it, the domain is catch-all and any acceptance of the real address is meaningless. Some large providers behave the same way by design: Yahoo, for example, accepts recipients at the SMTP stage regardless. And some gateways accept everything and bounce later, which RFC 5321 section 3.3 permits. Catch-all email domains covers how common this is in B2B lists and how to handle it.

The honest output for these addresses is "risky" or "unknown", not "valid". Any tool that marks a catch-all address as valid is guessing.

Where the other answers come from

A full verifier combines the layers with a couple of cheap lookups that don't touch the mail server:

  • Disposable domain lists. A mailbox at a throwaway provider can be perfectly real and still useless to you. Check against a maintained list such as the community disposable-email-domains repo before probing.
  • Role accounts. info@ and support@ exist and accept mail but reach a shared inbox, which matters for outreach.
  • Typo suggestions. jane@gmial.com might fail at the DNS step, or worse, pass it. Suggesting gmail.com is more useful than an "invalid" label.

Doing it with an API call

If you don't want to run a prober, POST https://pingutil.com/v1/verify runs the sequence above (syntax, disposable list, DNS and MX, RCPT TO without sending, then the catch-all probe) and returns one decision:

curl -s https://pingutil.com/v1/verify \
  -H "Authorization: Bearer $PINGUTIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "jane@example.com"}'

The response has status (valid, invalid, risky or unknown), a reason such as mailbox_not_found, null_mx or accept_all, a 0 to 100 score, did_you_mean for typos, and a checks object showing which layer decided: syntax, disposable, domain_exists, has_mx, mailbox, catch_all. The raw SMTP reply is in smtp.code, smtp.enhanced and smtp.message, so you can see what the server actually said. Catch-all domains come back risky with reason accept_all, never valid, and a greylisted or blocked probe comes back unknown rather than a guess. Try an address in the live email verification demo, or read the verify API reference.

What to do with each result

  • Failed syntax, domain, MX or a clear 5.1.1: don't send. The address can't work.
  • 250 on a domain that rejected the random address: good to send.
  • Catch-all: send if you have another reason to trust the address, and let real bounces decide.
  • 4xx, timeouts, policy blocks: retry later, or let a confirmation email settle it. Greylisting and email verification explains why many of these clear up within an hour.

For signups, all of this is a pre-filter. The confirmation link is still the only thing that proves a human reads the inbox. For lists and outreach, the checks above remove most of the addresses that would hard-bounce, and the ones that remain uncertain are the ones to send to in small, careful batches.

Questions people ask

Can you check if an email address exists without sending a message?
Mostly. You can confirm the syntax, that the domain exists, that it publishes a mail server, and ask that server whether it will accept the recipient with SMTP RCPT TO, then hang up before any message is transmitted. The server's answer is usually honest, but catch-all domains and servers that refuse to answer mean some addresses can only be confirmed by real mail.
Does an SMTP RCPT TO check send an email to the person?
No. The client stops after RCPT TO and sends QUIT, so the DATA command never runs and nothing is delivered. The recipient sees nothing. The receiving server may log the connection.
Why can't I run SMTP checks from my own server or laptop?
Most cloud providers and residential ISPs block outbound port 25, and mail servers distrust connections from IPs without proper reverse DNS or with a poor reputation. A probe from the wrong network gets timeouts or blocks, which tell you nothing about the mailbox.