Email id Validator

How to verify email id is valid or fake?
The actual method is to send mail to given email id, If mail doesn’t bounce then we can assume that email is real.
But If we need to check multiple email id in single click then it is very hard to check one by one.

So I am going to show you step by step method to check email id is valid or not.


Step-1:- Open Terminal/CMD type nslookup -type=mx gmail.com to get the mx(mail exchanger) details of gmail.com
You’ll see output like this:
gmail.com mail exchanger = 20 alt2.gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 5 gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail exchanger = 40 alt4.gmail-smtp-in.l.google.com.

Step-2:- As you noticed that output of the nslookup, MX records may be multiple choose any but prefer to choose lowest level no. After that run this command:
telnet gmail-smtp-in.l.google.com 25

Step-3:- Say hello to server.
helo

Step-4:- Set sender email id.
mail from: <[email protected]>

Step-5:- Set the recipient’s email address to whom you are trying to verify:
rcpt to: <[email protected]>

The responseof the server for β€˜rcpt to’ command will give you an idea whether an email address is valid or not. You’ll receive an β€œOK” if the address exists else a 550 error like:

[email protected] – OK (Email id is valid).
[email protected] – The email account that you tried to reach does not exist(Email id may be fake).

See Below attached screen shot
How to validate email id is real or fake?

So using these steps I am trying to create a email validator tool by this tool you can easily check multiple email ids.
This tool is currently under development, So It is not validating all email ids but you can modify it according to your need and further support me to develop this tool.

Email validator tool

Download / fork source code from github and configure it in your localhost to check how it works.
Also you can see online working demo by clicking on demo button.
πŸ™‚

If you like this post please don’t forget to subscribe My Public Notebook for more useful stuff.

One Reply to “Email id Validator”

  1. Dear Rohit.

    I downloaded you email ID validation code but it work to much slow also it is showing my valid email id as invalid.

    What to do.

    I updated my php vesion as required to 5.5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.