Validate an Email Address with PHP

Before sending email via SMTP, the client computer initiates a transaction with the SMTP email server that is listening for commands on TCP port 25. The SMTP command HELO initiates a transaction with the mail server and identifies itself, MAIL FROM and RCTP specify the sender and recipients respectively while QUIT will close the conversation. If the mail server returns the status as 250, that means the email address is validate and exists.

@hbattat has written a wrapper PHP library that can be used to determine if an email address is real or not. You specify the sender’s email, the recipient’s email and connect to the mail server to know whether that email exists on the domain or not. Email verification can be done using Windows Telnet as well.

SMTP also provides the VRFY command to query when the specified user exists on the host or not but it is often ignored by mail servers.

Also see: Find Person by Email Address