Click here to Skip to main content
Click here to Skip to main content

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

Introduction

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.

Background

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.

WebService

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.

Pendings

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.

History

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.

License

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

Share

About the Author

carlosmsr
Architect
Argentina Argentina
No Biography provided

Comments and Discussions

 
Newssimilar tool for any mail account Pinmemberbenebx23-Aug-08 22:53 
QuestionIs SSL there? PinmemberDan'M19-Jul-07 2:35 
AnswerRe: Is SSL there? Pinmembercarlosmsr19-Jul-07 3:52 
GeneralRe: Is SSL there? PinmemberDan'M19-Jul-07 15:34 
GeneralRe: Is SSL there? Pinmembercarlosmsr21-Jul-07 12:20 

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.150327.1 | Last Updated 21 Jul 2007
Article Copyright 2007 by carlosmsr
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid