Mailbeam

What is email syntax validation?

Email syntax validation checks that an address is correctly formatted according to the RFC 5322 standard — the right structure of local part, @ symbol, and domain. It catches malformed addresses but can't confirm that a correctly formatted address actually exists.

What syntax validation checks

Syntax validation parses an address against the rules that define a legal email format: a local part before the @, a single @, and a domain with a valid structure. It rejects obvious errors like missing @ signs, illegal characters, double dots, or empty parts.

Done properly it also handles edge cases the RFC permits — quoted local parts, plus-addressing, and internationalized domains — which naïve regular expressions often get wrong by being either too strict or too loose.

Why syntax validation isn't enough

A perfectly formatted address can still be undeliverable: the domain may not exist, may have no MX record, or the mailbox may never have been created. Syntax validation only proves the string is shaped like an email, not that mail will reach a person.

That's why it's the first, cheapest stage of a verification pipeline. It quickly discards garbage input before the more expensive MX, SMTP, and reputation checks that determine real deliverability.

Where to run syntax validation

Client-side checks improve UX by catching typos as users type, but they can be bypassed, so syntax validation should always be enforced server-side too. Mailbeam performs RFC-compliant syntax validation as part of every verification, including normalization and typo detection.

Enforcing it server-side via an API guarantees the rule can't be skipped by a manipulated form or a direct API call, keeping malformed data out of your system.

Addresses that look wrong and are not

Most hand-written validators reject valid addresses. These all conform to the specification, and the length limits below are the ones that actually apply.

  user+invoice@example.com        valid   subaddressing (RFC 5233)
  "john doe"@example.com          valid   quoted local-part
  user@[192.0.2.1]                valid   address literal
  ------------------------------------------------------------
  .user@example.com               invalid dot-atom cannot lead with '.'
  user..name@example.com          invalid consecutive dots unquoted
  user@@example.com               invalid second '@' outside quotes

  Limits that are normative (RFC 5321 §4.5.3.1):
    local-part   64 octets
    domain      255 octets
    path        256 octets

The specification allows quoted local-parts, subaddressing and address literals, so a validator that rejects them is rejecting real users rather than catching typos.

In practice

A form receives "jane(at)example..com". Syntax validation rejects it immediately — it has no @ and a double dot in the domain — without spending an MX lookup or SMTP probe. A correctly formatted address then proceeds to the deeper checks.

Frequently asked questions

Does valid syntax mean the email is real?

No. Syntax validation only confirms the address is correctly formatted. The domain might not exist and the mailbox might never have been created — you need MX and SMTP checks to assess that.

Why not just use a regex?

Simple regexes tend to be wrong at the edges — rejecting valid addresses or accepting invalid ones. RFC 5322 has many nuances (quoted parts, plus-addressing, internationalized domains) that a robust validator handles correctly.

Should syntax validation run on the client or server?

Both. Client-side gives instant feedback, but it can be bypassed, so enforce it server-side too — ideally via an API call that can't be skipped.

Verify emails with confidence

Mailbeam handles all of this for you — syntax, MX, SMTP, catch-all, and disposable checks in one API call. 1,000 free verifications/month, no credit card.