hi,

i changed the code as follows:

procedure TMailer.SmtpClientRequestDone;

  function isError : boolean;
  begin
    result := false;
    if ((Error > 399) and (Error < 600)) or (error >= 10000) then result := 
true;
    if result then if assigned(FOnError) then  FOnError(FSmtp.ErrorMessage);
  end;

begin
  // it is possible that an exception arises here : smtp component not 
connected so
  with FSmtp do begin
    if isError then Rset
    else
    if not Connected then exit //Rset // fehlerbehandlung einbauen
    else
    case RqType of
      smtpConnect:
      begin
        if AuthType = smtpAuthNone then Helo else Ehlo;
      end;
      smtpHelo: MailFrom;
      smtpEhlo: Auth;
      smtpAuth: MailFrom;
      smtpMailFrom: RcptTo;
      smtpRcptTo: Data;
      smtpData: Quit;
//      smtpRset: Quit;
//      smtpQuit: begin
//        FBusy := false;
//        if assigned(FOnMailSent) then FOnMailSent(FMailId);
//      end;
    end;
  end;
end;


still i get the error "smtp component not connected", even if i check
explicitly for it.

any ideas ?

tia, retnyg


AG> [EMAIL PROTECTED] wrote:
>> hi there,
>> 
>> is there also such a known bug in smtpprot.pas ?

AG> No known issues. Please check your code. An error is anything > 0!
AG> This can be a winsock error code > 10000 or an SMTP error
AG> code. The action to be taken depends on both current request
AG> type and error code, read the RFCs for a description of SMTP
AG> error codes. Also a reconnect should never be tried by calling
AG> Connect from a component event handler but by posting a 
AG> custom message, in the message handler calling Connect is safe. 

AG> --
AG> Arno Garrels [TeamICS]
AG> http://www.overbyte.be/eng/overbyte/teamics.html


>> (testing with a gmx account)
>> my app receives mail through pop3prot.pas then forwards them through
>> smtpprot.pas.
>> 
>> at first i received the exception "smtp component not connected" in
>> smtpclientrequestdone, now i built in a check if not connected, now i
>> receive "smtp component not ready".
>> 
>> procedure TMailer.SmtpClientRequestDone;
>> 
>>   function isError : boolean;
>>   begin
>>     result := false;
>>     if (Error > 399) and (Error < 600) then result := true;
>>     if result then if assigned(FOnError) then 
>> FOnError(FSmtp.ErrorMessage);   end;
>> 
>> begin
>>   // it is possible that an exception arises here : smtp component
>> not connected so   with FSmtp do begin
>>     if isError then Rset
>>     else
>>     if not Connected then Connect
>>     else
>>     case RqType of
>>       smtpConnect:
>>       begin
>>         if AuthType = smtpAuthNone then Helo else Ehlo;
>>       end;
>> ....
>> 
>> tia, retnyg



-- 
Mit freundlichen Grüßen
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to