Man T
2008-07-16 22:59:11 UTC
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;
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;