title: Modify Wordpress email text with functiion
body: <p>I want to get, modify and return the message of the sending emails in WordPress with a function.</p>
  
  <p>I tried with gettext filter with no results. I tried wp_mail filter where I feel is a better approach but I can not get this to work.</p>
  
  <pre><code>add_filter('wp_mail','edit_email', 10,1);
  function edit_email(){
      $args['message']=str_replace( 'foo', 'bar', $args['message'] );
      return $args['message'];
  }
  </code></pre>