How to check if a gmail account exists

Every time an email is sent from your favorite client like Outlook, ThunderBird or even web based email clients, there is a certain communication that goes behind the scene in delivering the email to the right destination. Here is a peek into the conversation between the sender and recipient servers of an email and the information about how to check if a gmail account exists.





Connecting to the gmail mail server

The first step in sending an email is to identify the correct mail exchange server for the recipient’s domain name. For eg:- to send an email to ipmarker@gmail.com , we need to identify the MX record for the recipient’s domain, this can be achieved by the nslookup utility. For gmail the SMTP mail server is gmail-smtp-in.l.google.com

  1. At the command prompt type “telnet gmail-smtp-in.l.google.com 25″ and press enter. This will connect to the gmail SMTP server running on port 25.
  2. Now, type “ehlo” and press enter
  3. Next type “mail from:<youremail@yourdomain.com>” and press enter
  4. Next type “rcpt to:<gmailaccounttocheck@gmail.com>” and press enter.
  5. Now wait for the result, if the answer is “OK” then the gmail address is valid , else you get the following error

“The email account that you tried to reach does not exist”

 

Below is a sample conversation I had with the gmail server

C:\> telnet gmail-smtp-in.l.google.com 25

220 mx.google.com ESMTP h22si9897910anp.206
ehlo
250-mx.google.com at your service, [74.99.243.104]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
mail from:<info@ipmarker.com>
250 2.1.0 OK h22si9897910anp.206
rcpt to:<invalidgmailaddress123@gmail.com>
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://mail.google.com/support/bin/answer.py?answer=6596 h22si9897910a
np.206

As you can see above, I tried to check if the account invalidgmailaddress123@gmail.com exists and as expected the gmail SMTP server returned that the account does not exist. In case of a valid account, a similar response as below is returned.

250 2.1.5 OK m9si4038241ybh.77

 

Note:If you get the error “telnet command not found”, you need to enable telnet http://visibleprocrastinations.wordpress.com/2009/06/15/enable-telnet-in-windows-7/





0 comments… add one

Leave a Comment