title: How to check if an email address is real or valid using PHP
body: <p>I found some websites that claim to verify if email addresses are valid. Is it possible to check if an email address is valid using just PHP? </p>
  
  <pre><code>&lt;?php
      if($_POST['email'] != ''){
          // The email to validate
          $email = $_POST['email'];
  
          // An optional sender
          function domain_exists($email, $record = 'MX'){
              list($user, $domain) = explode('@', $email);
              return checkdnsrr($domain, $record);
          }
          if(domain_exists($email)) {
              echo('This MX records exists; I will accept this email as valid.');
          }
          else {
              echo('No MX record exists;  Invalid email.');
          }
      }
  ?&gt;
  &lt;form method="POST"&gt;
      &lt;input type="text" name="email"&gt;
      &lt;input type="submit" value="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is what I have right now. <strong>It checks if the domain exist</strong>, <em>but it cannot check if the
  user's email exist on that domain</em>. Is it possible to do that using PHP?</p>