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 email@example.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
- 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.
- Now, type “ehlo” and press enter
- Next type “mail from:<firstname.lastname@example.org>” and press enter
- Next type “rcpt to:<email@example.com>” and press enter.
- 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
250-mx.google.com at your service, [18.104.22.168]
250 2.1.0 OK h22si9897910anp.206
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
As you can see above, I tried to check if the account firstname.lastname@example.org 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/