Click here to Skip to main content
13,507,594 members
Click here to Skip to main content
Add your own
alternative version


35 bookmarked
Posted 13 Jul 2007

POP3 Client Over Firewall

, 21 Jul 2007
Rate this:
Please Sign up or sign in to vote.
A webservice implementation to connect to POP3 servers
Screenshot - POP3Proxy.gif


This is a more complex implementation of the same schema I used in XML Serialization and Firewalls.

The solution is composed of a Webservice that works as a proxy (it receives the request, connects to the POP3 server, and returns the processed answers) and a client that receives and presents the results to the user.


Basic experience on Webservices and network programming will help.

Using the Code

The code itself does not present any particular difficulty. But I've tried to keep a design where all component classes are clearly separated.

The Windows client is coded with a reference to the webservice hosted in the local host. This way the solution can be built quickly and easily, but you probably would like to point it to a webserver hosted outside the LAN where it wouldn't be blocked by the same firewall that blocks your browser.

Component Projects

The solution is composed of several projects.

Base Elements

These are the most general classes. You will find the class that implements the EMail structure and the Quoted Text Decoder.

EMail Support

Probably not a good name. Here is where the communication with the POP3 server is handled and its answers are converted to the corresponding EMail objects. The POP3Manager that encapsulates the two previous classes and gives the user a much more friendly interface.


It exposes the POP3Manager as a Webservice.

Windows Client (User Interface & Application Support)

The first one implements a Windows Forms user interface. The second is a simple class that handles the proxy class for the Web Reference.


This is a very basic build in a very early stage of development. The main purpose is to present a working implementation of the described solution. Currently it will show many limitations and bugs (both on the client and server side and many in the email parsing process).

You may notice the SMTP class. It is not implemented yet.


If feedback is provided or support requested, I'll keep working in this sample application.

  • July 21st: POP3S (or POP3 over SSL) support added. Check Pop3Manager and Pop3Client for changes. You will find that the protocol itself doesn't require any change, it is the TcpClient that needs to be configured to properly handle the SSL stream. There is a new class named SslManager. It is only providing the most basic support for these tasks and further development could be useful. I still haven't had time to modify the client interface to support this new feature.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Argentina Argentina
No Biography provided

You may also be interested in...

Comments and Discussions

Newssimilar tool for any mail account Pin
benebx23-Aug-08 21:53
memberbenebx23-Aug-08 21:53 
QuestionIs SSL there? Pin
Dan'M19-Jul-07 1:35
memberDan'M19-Jul-07 1:35 
AnswerRe: Is SSL there? Pin
carlosmsr19-Jul-07 2:52
membercarlosmsr19-Jul-07 2:52 
GeneralRe: Is SSL there? Pin
Dan'M19-Jul-07 14:34
memberDan'M19-Jul-07 14:34 
GeneralRe: Is SSL there? Pin
carlosmsr21-Jul-07 11:20
membercarlosmsr21-Jul-07 11:20 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180417.1 | Last Updated 21 Jul 2007
Article Copyright 2007 by carlosmsr
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid