How email address validation works

There are a few phases of email address validation which require different amounts of processing. Syntactic, domain and user validity. You can use Real Email to do this checking.

Syntactic validation

A valid email address must match technical rules as defined by rfc's most commonly rfc 5322 https://tools.ietf.org/html/rfc5322. Basically it means it looks like foo@bar.com. There are a few corner cases about symbols but the basic rules are.

  • there must be only 1 @

  • before the @ must be less than 65 letters

  • after the @ must be less that 256

Domain and email server validation

For a email domain to be correct it must have the correct address information for the mail server, and that mail server must follow certain protocols to accept and send emails. You can think of the domain as a name in a phone book which has an address which tells you which street to find the server on. This is implement as a DNS MX record.

The account exists for the user

Checking that a user exists on the email server requires talking over email protocols and asking the server. Care must be taken as different mail servers can communicate different ways and have different protections. It is not uncommon for email servers to have ip address blocking algorithms.