Before you begin
The examples shown below are based on two key assumptions:
- That you have already create a basic automated test using our getting started guides.
- You have a chosen assertion library that you will use to test the values shown below.
Accessing SpamAssassin results
Allows you to perform a SpamAssassin check against an email. The structure returned matches the spam test object:
const result = await mailosaur.analysis.spam(message.id)
console.log(result.score) // 0.5
result.spamFilterResults.spamAssassin.forEach(r => {
console.log(r.rule)
console.log(r.description)
console.log(r.score)
})
See also
Previous
Message properties