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

Namespace: MailBee.AntiSpam
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
public int ScoreMessage(
	MailMessage message


Type: MailBee.MimeMailMessage
A reference to the MailMessage object representing the message to be scored.

Return Value

Type: Int32
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).
MailBeeInvalidArgumentExceptionmessage is a null reference (Nothing in Visual Basic).

ScoreMessage(MailMessage) 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(String, String) method.

The example is available in BayesFilter topic.
See Also