CFML wrapper for the Postmark SpamAssassin API
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


ColdFusion 8 or above (i.e. JSON functions are supported).


Create an instance of the CFC. You might like to cache this in a persistent scope, e.g. the application scope.

spamchecker = createObject("component", "PostmarkSpamAssassin");

Then pass the email to be checked to the CFC methods:

spamchecker.getScore(email) - returns the spam score

spamchecker.getReport(email) - returns the detailed SpamAssassin report

You can also access the full JSON response:


Error Handling

All errors are thrown for you to catch:

  • if the remote call fails or times out
  • if the remote call returns an HTTP error code
  • if SpamAssassin returns an error (the message of the exception will be the error)