Php: check if email content is spam

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";
}
+3
source share
3 answers

:

1. .

2. Akismet/Sblam

3.

  • captcha .

4. .

  • URL-, .
+1

, - Akismet. Akismet . Wordpress. , - Akismet. / .

+2

-, , ,

- , spamassassin - , , . - .

However, you will simply become a target for spammers if you are not very careful with setting the credentials of your users - and this, at least, means checking a valid email address - and if they have a valid email address, why they will use your service ?

+1
source

Source: https://habr.com/ru/post/1785660/


All Articles