title: Validating emails using checkdnsrr, a good or bad solution?
body: <p>I am using the below code to validate emails</p>
  
  <pre><code>if (checkdnsrr($domain , "MX")) {
      echo 'mx - pass &lt;br&gt;';
  } else {
      echo 'mx - fail &lt;br&gt;';
  }
  </code></pre>
  
  <p>My desire is to check that the domain is valid and has an MX record.</p>
  
  <p>I am already using a regular expression to check the email format, but people enter things like someone@gmail.con which obviously is wrong but pases basic format validation.</p>
  
  <p>I want to validate further but I do not want to go too far and get false negatives.</p>
  
  <p>Does anyone see any issue with my solution or have a better way?</p>