I'm creating a newsletter feature that will allow users to send emails. Since there are malicious people out there who would want to send spam, I'm wanting to be able to check and see if the message created is spam or not.
I've looked at a couple different methods like trying spam assassin but you need the full email which I won't have until later. Or you need to install some other utilities like spamd, but I'm looking for a php class that does this for me anyone know of anything? Or am i stuck having to install some command line app that does this?
Ideally something easy like this:
$spamChecker = new SpamChecker();
$message = "Free Credit report, blah blah, I am spam! Detect me if you dare!";
if($spamChecker->isSpam($message)) {
echo "You are a spammer!";
} else {
echo "you are my friend";
}
I would have the following line of protection: