title: Wordpress plugin - using esc_attr before mail - safe?
body: <p>i created a wordpress plugin in which i want to send an email to an address that has been inserted into a form. I use it like this:</p>
  
  <pre><code>$to_email = esc_attr($_POST['to_email']);
  mail($to_email, ...
  </code></pre>
  
  <p>Is this safe in regards to spams etc or do i have to use another wordpress function, except esc_attr, to disable possible threats via this form?</p>
  
  <p><a href="http://codex.wordpress.org/Function_Reference/esc_attr" rel="nofollow">http://codex.wordpress.org/Function_Reference/esc_attr</a></p>
  
  <p>Thanks!</p>