I am creating a newsletter feature that will allow users to send emails. Since there are evil people who would like to send spam, I want to check and see if the message was created as spam or not.
I looked at a couple of different methods, such as trying a spam killer, but you need a full email that I won’t be using for longer. Or you need to install some other utilities like spamd, but I am looking for a php class that does this for me, does anyone know anything? Or do I need to install some kind of command line application that does this?
Ideally, something simple:
$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";
}
source
share