title: Wordpress contact-form-7 plugin do something before mail
body: <p>I have got a wordpress instance with the plugin contact-form-7. In some tutorials, I saw that I can do something before sending the mail with this code:</p>
  
  <pre><code>add_action("wpcf7_before_send_mail", "wpcf7_do_something_else");
  
  function wpcf7_do_something_else(&amp;$wpcf7_data) {
  
      // Here is the variable where the data are stored!
      var_dump($wpcf7_data);
  
      // If you want to skip mailing the data, you can do it...
      $wpcf7_data-&gt;skip_mail = true;
  
  }
  </code></pre>
  
  <p>I got the code from here <a href="http://code.tutsplus.com/tutorials/mini-guide-to-contact-form-7--wp-25086" rel="nofollow">http://code.tutsplus.com/tutorials/mini-guide-to-contact-form-7--wp-25086</a></p>
  
  <p>But somehow, it is not working. I don't receive any error - the contact form is not sending the mail anymore, even without the <code>$wpcf7_data->skip_mail = true</code>, and it doesn't print anything.</p>
  
  <p>My questions:</p>
  
  <p>Where do I have to write this code? Directly into the plugin? (At the moment, I wrote this code into a custom plugin, maybe wrong?)
  Is it even possible to print any data from the form in there? (Is the tutorial bad?)</p>
  
  <p>Thanks!</p>