title: Checking of whether email exist or not, only works for gmail accounts, others not working
body: <p>I am creating a python function to check whether a given email ID really exists or not in Python. Here is my code:</p>
  
  <pre><code>def email_validate(email_address):
      addressToVerify = email_address
      domain_name = addressToVerify.split('@')[1]
      try:
          records = dns.resolver.query(domain_name, 'MX')
      except Exception as e:
          print e
          a = traceback.format_exc()
          print a
          return HttpResponse(json.dumps({"success":False,"message":"Email Domain is not valid."}), content_type="application/json")
  
      mxRecord = records[0].exchange
      mxRecord = str(mxRecord)
  
      server = smtplib.SMTP()
      server.set_debuglevel(0)
  
      # SMTP Conversation
      server.connect(mxRecord)
      server.helo(host)
      server.mail('me@domain.com')
      try:
          code, message = server.rcpt(str(addressToVerify))
          server.quit()
      except:
          a = traceback.format_exc()
  
      if code == 250:
           return HttpResponse(json.dumps({"success":True,"message":"Email ID is valid."}), content_type="application/json")
      else:
           return HttpResponse(json.dumps({"success":False,"message":"Email ID is not valid."}), content_type="application/json")
  </code></pre>
  
  <p>This code works fine for Gmail accounts, but it gives an error for other email ID's. If I try other Email ID's, this line: </p>
  
  <pre><code>code, message = server.rcpt(str(addressToVerify))
  </code></pre>
  
  <p>gives an error...
  Also, how should I check this for other email ID's?</p>