title: How do I check if email submitted via Contact form 7 exists in my database?
body: <p>When customer submits email via contact form 7, how do I check if email already exists in my database and change notification message to "Your email already exists in our database"</p>
  
  <p>So far I have tried using before_send hook, but when I click submit, the page just hangs and no confirmation message.</p>
  
  <p>Below is the function I have in my functions.php</p>
  
  <pre><code>add_action( 'wpcf7_before_send_mail', 'check_email' );
  
  function check_email( $cf7 )
  {
  $email = $cf7-&gt;posted_data["email"];
  if($email == 'Is in our database'){
  echo ('Your email exists in our database');
  }
  }
  </code></pre>
  
  <p>Thanks for your help</p>