---
title: "Aspose::Email::AntiSpam::SpamAnalyzer::Test method"
url: "https://reference.aspose.com/email/cpp/aspose.email.antispam/spamanalyzer/test/"
product: "Aspose.Email for C++"
description: "Analyses the message and returns the probability of the message being spam."
---


## Test {#test}

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

**Returns:** A double value in 0-1 range, where 0 corresponds to "definitely non-spam" (0% spam probability) and 1 corresponds to "definitely spam" (100% spam probability).

```cpp
Test(System::SharedPtr < MailMessage > message)
```

| Parameter | Description |
| --- | --- |
| message | MailMessage for test the probability of the message being spam. |

