Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jul : Indy TIdSMTP timeout

www.cryer.info
Managed Newsgroup Archive

Indy TIdSMTP timeout

Subject:Indy TIdSMTP timeout
Posted by:"Man T" (alanpltse_nospam@yahoo.com.au)
Date:Thu, 17 Jul 2008 08:59:11

Delphi 5.
In the TIdSMTP.Connect method, in order to set the timeout to infinity, do I
use 0?
eg.
IdSMTP.Connect(0)
or
IdSMTP.Connect()?

However, looking into the source code of TIdSMTP.Connect, it does not use
this timeout parameter:

procedure TIdSMTP.Connect(const ATimeout: Integer = IdTimeoutDefault);
var
  NameToSend : String;
begin
  inherited;
  try
    GetResponse([220]);
    FAuthSchemesSupported.Clear;
    if Length(FHeloName) > 0 then
      NameToSend := FHeloName
    else
      NameToSend := LocalName;
    if FUseEhlo and (SendCmd('EHLO ' + NameToSend )=250) then begin //APR:
user can prevent EHLO    {Do not Localize}
      GetAuthTypes;
    end
    else begin
      SendCmd( 'HELO ' + NameToSend, 250 );    {Do not Localize}
    end;
  except
    Disconnect;
    Raise;
  end;
end;

Replies:

www.cryer.info
Managed Newsgroup Archive