TidPop3 connect and readtimeout

Giganews Newsgroups
Subject: TidPop3 connect and readtimeout
Posted by:  Jhoe Logz (er…@smsglobal.com)
Date: Tue, 2 Mar 2004

using Indy ver 9

what is the difference between .Connect with TimeOut and .ReadTimeOut?

how come there is no exception with my code?
try
      POP.Connect(6000); // this part seems not working. do i need to use
ReadTimeOut?

      FMsgCount := POP.CheckMessages;
      Msg.Clear;
      if FMsgCount > 0 then

      begin
        for i := 1 to FMsgCount do
        begin
          Msg.ClearBody;
          POP.Retrieve(i, Msg);
          for intIndex := 0 to Pred(Msg.MessageParts.Count) do
          begin //body text
            if Msg.MessageParts.Items[intIndex] is TIdText then
            begin

TidText(Msg.MessageParts.Items[intIndex]).Body.SaveToFile(ExeDir +
'SMSEmailTemp\' + IntToStr(DateTimeToUnix(Now)) + inttostr(i) + '.txt');
            end;
          end;
          Pop.Delete(i);
        end;
      end;
    except
      POP.Disconnect;
    end;

Replies