Click here to Skip to main content
11,802,442 members (73,916 online)
Click here to Skip to main content

Using the ZetaSpamAssassin Wrapper in a real-world Application

, 18 Feb 2006 CPOL 33.3K 436 20
Rate this:
Please Sign up or sign in to vote.
An article about building an application for checking for spam


(This article is a follow-up to my article "A C# Wrapper for the SpamAssassin Protocol".)

In this article, I will show you a web-application that checks whether given texts contain spam or no spam by using SpamAssassin, a strong and popular backend-system for doing the actual checks.

In addition, you'll find a ready-to-use web service that easily enables you to include spam-checking functionality in arbitrary applications.

See for a live demo.

The Web Application

The web application is a GUI to the web service (described below) and consists of a single textbox where you can enter text. After clicking the "Check now" button, the text is sent through the SpamChecker class to the SpamAssassin server for checking.

If the SpamAssassin server decides that the text is spam, the following information is shown:

If the message seems to contain no spam, the following information is shown:

Currently the application has no further functionality. I will add new functions when the web service is enhanced, too.

The Web Service

The web service currently contains two functions:

  • IsSpam - Simple check whether a given text contains spam or no spam.
  • CheckSpam - Advanced check whether a given text contains spam or no spam. Returns the detected spam level and the threshold of the server.

Currently no further functions are included. Thanks to your suggestions I plan to add functions for explicitly telling the server that a certain message is spam or no spam.


The installation requirements are the same as those described in the article "A C# Wrapper for the SpamAssassin Protocol".

Ready-to-use Web Service on our Servers

If you are lazy (every software developer is lazy, I guess) or if it is impossible for you to set up the required infrastructure, then you can access the web service I set up on our web server for using in my own applications:


In this article, I shortly introduced you to a web application and a web service that is based on the C# classes I developed for communicating with a SpamAssassin server.

The version introduced here is just the beginning. I will add more functions as I find the time and the ideas. Since I do use the web service in our own applications, you can rely on the constant improvement of the web service and the underlying classes.

In addition, I do need your feedback, questions, bug reports, improvements, suggestions, tips, etc. Please post them in the comments section at the end of this article!



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.

Some cool, free software from us:

German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email

You may also be interested in...

Comments and Discussions

QuestionIs there a way? Pin
Konnekt7-Mar-10 15:12
memberKonnekt7-Mar-10 15:12 
Generalneed the code of zetaspam web services Pin
ferozasi27-May-08 21:13
memberferozasi27-May-08 21:13 
GeneralNot working well enough Pin
Judah Himango6-Oct-07 15:25
memberJudah Himango6-Oct-07 15:25 
GeneralRe: Not working well enough Pin
Uwe Keim6-Oct-07 20:03
sitebuilderUwe Keim6-Oct-07 20:03 
GeneralRe: Not working well enough Pin
Judah Himango8-Oct-07 4:23
memberJudah Himango8-Oct-07 4:23 
GeneralThanks! Pin
Judah Himango3-Oct-07 7:22
memberJudah Himango3-Oct-07 7:22 
GeneralRe: Thanks! Pin
Uwe Keim3-Oct-07 8:05
sitebuilderUwe Keim3-Oct-07 8:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151002.1 | Last Updated 18 Feb 2006
Article Copyright 2006 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid