Click here to Skip to main content
15,122,218 members
Articles / Web Development / ASP.NET
Posted 18 Feb 2006


20 bookmarked

Using the ZetaSpamAssassin Wrapper in a real-world Application

Rate me:
Please Sign up or sign in to vote.
4.72/5 (12 votes)
18 Feb 2006CPOL2 min read
An article about building an application for checking for spam
Image 1


(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:

Image 2

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

Image 3

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:

Deutschsprachiges Forum zu Elektromobilität und Tesla  
Windows 10 Ereignisanzeige  
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

Comments and Discussions

QuestionIs there a way? Pin
Konnekt7-Mar-10 16:12
MemberKonnekt7-Mar-10 16:12 
Generalneed the code of zetaspam web services Pin
ferozasi27-May-08 22:13
professionalferozasi27-May-08 22:13 
GeneralNot working well enough Pin
Judah Gabriel Himango6-Oct-07 16:25
sponsorJudah Gabriel Himango6-Oct-07 16:25 
GeneralRe: Not working well enough Pin
Uwe Keim6-Oct-07 21:03
sitebuilderUwe Keim6-Oct-07 21:03 
GeneralRe: Not working well enough Pin
Judah Gabriel Himango8-Oct-07 5:23
sponsorJudah Gabriel Himango8-Oct-07 5:23 
GeneralThanks! Pin
Judah Gabriel Himango3-Oct-07 8:22
sponsorJudah Gabriel Himango3-Oct-07 8:22 
GeneralRe: Thanks! Pin
Uwe Keim3-Oct-07 9:05
sitebuilderUwe Keim3-Oct-07 9:05 

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

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