MailBee.NET Objects 7.1

BayesFilter.ScoreMessage Method 

Analyses the message and returns the probability of the message being spam.

public int ScoreMessage(
   MailMessage message
);

Parameters

message
A reference to the MailMessage object representing the message to be scored.

Return Value

An integer value in 0-100 range, where 0 corresponds to "definitely non-spam" (0% spam probability) and 100 corresponds to "definitely spam" (100% spam probability).

Remarks

ScoreMessage method will always show 50% result if the database is an empty or absent at all. So, there is no sense to use this method preparatory to the moment when the database has any data (the more the better).

In case of multy-threading AutoLearning property should be set to false.

When the AutoLearning property is set to true, Bayesian database may update itself in memory. It may need to update database on disk. To store database to disk please use SaveDatabase method.

Exceptions

Exception TypeCondition
MailBeeInvalidArgumentException message is a null reference (Nothing in Visual Basic).

Example

The example is available in BayesFilter topic.

See Also

BayesFilter Class | MailBee.AntiSpam Namespace | AutoLearning