pop3 and proxy

Giganews Newsgroups
Subject: pop3 and proxy
Posted by:  MCH (mchaku…@21cn.com)
Date: Thu, 08 Jan 2004

Hi all,
  I got a mail client that doesn't support proxy. I am writing a
program to receive mail via a proxy. For that purpose, I use
TIdPop3Server as a local pop3 server and let TIdPop3 to receive mail
form the real mail server. First, I reset the mail client program with and monitor the request at 5110 port with
TIdPop3Server. Once I get the request from mail client, I active
TIdPop3 to receive the mail and then send the mail to mail client via
TIdPop3Server. However, there are still some problems. First, I would
like to use a proxy (locate in remote site) to receive a mail but I found
nowhere in TIdPOP3 to set a proxy as easy as that in TIdHttp.

Second, after I received the mail, I got lots of information from the
real server. What sort of information I should tell
TIdPop3Server?(i.e. How to feed the TIdPop3Server with the incoming
message from TIdPop3).

BTW, I wonder why using TIdPop3 is very very very slow while receiving
mail. The speed is impressive when I use the mail client to receive
mail for the same account direcly.

  FMsgCount :Integer;
  FMailBoxSize :Integer;
  if POP.Connected then
  POP.Host := pop.21cn.com';
  POP.Port := 110;
  POP.Username := 'Tryit';
  POP.Password := '123456';
  FMsgCount := POP.CheckMessages;
  FMailBoxSize := POP.RetrieveMailBoxSize div 1024;
  if FMsgCount > 0 then
    Showmessage('You got mail!');
  else ShowMessage('No messages on server');

OK. Now I got a first approach for this problem but found it's not very
good. I resort to TIdMasterTunnel and TIdSlaveTunnel. However, I have no
idea about this components. what should I do to receive mail via a remote

Thanks a lot.