Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
CFML wrapper for the Postmark SpamAssassin API
ColdFusion
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
PostmarkSpamAssassin.cfc
README.md

README.md

Requirements

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

Usage

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:

spamchecker.doSpamCheck(email)

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)
Something went wrong with that request. Please try again.