POP3 with SOCKS or HTTP Proxy in C#

Giganews Newsgroups
Subject: POP3 with SOCKS or HTTP Proxy in C#
Posted by:  komtur (komt…@gmx.de)
Date: Mon, 23 Jul 2007


sorry another newbie question:

I'm trying to implement a POP3 Client that connects a proxy.
Either a HTTP Proxy or a Socks Proxy.

Here's my code snippet.
frm is my Windows Form Configuration Window with the POP3- and Proxy settings.

/* snippet  */

using Indy.Sockets;

POP3 pop3Conn = new POP3();

pop3Conn.Host = frm.POP3ServerName;
pop3Conn.Username = frm.POP3UserName;
pop3Conn.Password = frm.POP3Pwd;

IOHandlerStack io = new IOHandlerStack();
pop3Conn.IOHandler = io;

CustomTransparentProxy http_proxy = new CustomTransparentProxy();
// this fails with "could not create instance of abstract class Indy.Sockets.CustomTransparentProxy"

http_proxy.Host = frm.ProxyHost;
http_proxy.Port = frm.ProxyPort;

/* snippet end */

This fails with the error: Could not create an instance of the abstract class Indy.Sockets.CustomTransparentProxy