Notice!
This program is no longer being maintained or updated.
For an unofficial open source build with the latest instruments and other additions, go here
check if email exists php

Check If Email Exists Php [work] May 2026

This is the only truly reliable “exists” check in PHP. ⚠️ B. Validate email format + domain MX records if (!filter_var($email, FILTER_VALIDATE_EMAIL)) // invalid format

This will fail for Gmail, Outlook, Yahoo, and most corporate servers. | Use Case | Best Approach | |----------|----------------| | Prevent duplicate signups | Check your own database (unique index + SELECT) | | Reduce typos at signup | Format + MX check + email confirmation | | Validate email for contact form | Format + MX + optional DNSBL check | | Bulk email list cleaning | Paid API (NeverBounce, etc.) | | “Does this mailbox exist right now?” | Impossible without sending a verification link | check if email exists php

function email_exists($email) // ... format check ... // ... MX check ... // ... SMTP RCPT TO ... return $smtp_code === 250; This is the only truly reliable “exists” check in PHP

$domain = substr(strrchr($email, "@"), 1); if (!checkdnsrr($domain, "MX")) // domain has no mail exchanger | Use Case | Best Approach | |----------|----------------|