title: Is there a way to use PHP to check whether my mail content is spam?
body: <p>The idea is before i send the mail , I would like to use some code to check the content whether it use spam phrase .  Here is some simple code</p>
  
  <pre><code>function isSpam($text)
  {
      $pattern = "/\b(actual|filter|removed|because|it|contained|obscenities)\b/i";
  
      if(preg_match($pattern, $text, $match))
          return true;
      else
          return false;
  }
  </code></pre>
  
  <p>The question are:</p>
  
  <ol>
  <li><p>Are there any way to improve the code such as check the occur time not only check if it is exist? </p></li>
  <li><p>Are there any plugin or code exist already so I do not have to redo it?</p></li>
  <li><p>Bayesian Spam Filter is all about a mail inbox ? Is it useful as an <strong>outgoing email filter</strong>?</p></li>
  </ol>
  
  <p>Thank you for helping</p>