Last Updated: February 25, 2016
·
1.293K
· yeuem1vannam

Check if an email exist

Want to check

an.existed.email@gmail.com
not.existed.email@gmail.com

First, you must get the Mail Exchange server of those emails by

nslookup -q=mx gmail.com

Response

Non-authoritative answer:
gmail.com   mail exchanger = 5 gmail-smtp-in.l.google.com.
gmail.com   mail exchanger = 30 alt3.gmail-smtp-in.l.google.com.
gmail.com   mail exchanger = 20 alt2.gmail-smtp-in.l.google.com.
gmail.com   mail exchanger = 40 alt4.gmail-smtp-in.l.google.com.
gmail.com   mail exchanger = 10 alt1.gmail-smtp-in.l.google.com.

Then, use telnet to talk with mail server

telnet alt4.gmail-smtp-in.l.google.com 25

Response

Trying 74.125.131.27...
Connected to alt4.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP h18si12497453vdg.75 - gsmtp

Type

HELO PHUONG

You should receive

250 mx.google.com at your service

Then type your email

MAIL FROM:<info@phuonglh.name.vn>

Mail server will response

250 2.1.0 OK h18si12497453vdg.75 - gsmtp

So now you should check the email with

RCPT TO:<an.existed.email@gmail.com>

This is an existed email, so mail server will response with status 250

250 2.1.5 OK uj9si12527336vec.101 - gsmtp

Check with other email

RCPT TO:<not.existed.email@gmail.com>

Because this is not existed email, so mail server will response 550

550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 h18si12497453vdg.75 - gsmtp

Enjoy.