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
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;
}
The question are:
Are there any way to improve the code such as check the occur time not only check if it is exist?
Are there any plugin or code exist already so I do not have to redo it?
Bayesian Spam Filter is all about a mail inbox ? Is it useful as an outgoing email filter?
Thank you for helping