----- Original Message -----
From: Vander Clock Stephane
To: [EMAIL PROTECTED]
Sent: Friday, November 04, 2005 3:45 PM
Subject: TCustomSmtpClient.AuthGetType
In your function below:
procedure TCustomSmtpClient.AuthGetType;
var
I : Integer;
S : String;
aEntry : String;
begin
{ Not sure whether UpperCase & Trims are needed or not, anyway - should }
{ not hurt. Find SmtpAuthTypes in Ehlo response lines. }
S := UpperCase(Trim(FLastResponse));
Delete(S, 1, 4);
if (CompareText(Copy(S, 1, 5), 'AUTH ') = 0) or
(CompareText(Copy(S, 1, 5), 'AUTH=') = 0) then begin
S := Copy(S, 5, Length(S));
{ supported by all versions??? }
{S := StringReplace(S, '=', ' ', [rfReplaceAll]);}
for I := 1 to Length(S) do begin
if S[I] = '=' then
S[I] := ' ';
end;
while TRUE do begin
I := Pos(' ', S);
if I <= 0 then begin
aEntry := Trim(S);
if FAuthTypesSupported.IndexOf(aEntry) = -1 then
FAuthTypesSupported.Add(aEntry);
break;
end
else begin
aEntry := Trim(Copy(S, 1, I - 1));
if FAuthTypesSupported.IndexOf(aEntry) = -1 then
FAuthTypesSupported.Add(aEntry);
Delete(S, 1, I);
end;
end;
end;
end;
I think you must replace
S := Copy(S, 5, Length(S));
by
S := Copy(S, 6, Length(S));
--
a+
stéphane
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be