Re: [twsocket] pop3 component not ready - Bug in TPop3Cli

2008-01-18 Thread DZ-Jay

On Jan 17, 2008, at 07:34, [EMAIL PROTECTED] wrote:

 it didnt fix the issue, got a pop3 not ready exception today.

Can you post some code so that we know how you tried to fix it?

dZ.

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
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


Re: [twsocket] pop3 component not ready - Bug in TPop3Cli

2008-01-18 Thread Arno Garrels
DZ-Jay wrote:
 Can you post some code so that we know how you tried to fix it?

The bug I found is the Special processing for Quit below.

procedure TCustomPop3Cli.TriggerRequestDone(Error: Word);
begin
== (*  
{ Special processing for Quit (Roger Morton 24-12-99) }
if FRequestType = pop3Quit then begin
if FWaitingOnQuit then
{ When the second RqDone arrives (from WSocketSessionClosed),   }
{ treat it as a normal event by setting a zero Error code   }
Error := 0
else begin
{ When the first RqDone arrives, set the FWaitingOnQuit flag so }
{ we're ready to handle a second RqDone.}
{ Take no other action (in particular, we don't advise the user }
{ that the first RqDone has happened)   }
FWaitingOnQuit := True;
Exit;
end;
{ Fall down here for all normal RqDone, and after the second RqDone }
{ following a Quit  }
FWaitingOnQuit := False;
end;
== *)

This code prevents that RequestDone fires in case the server doesn't
send a response to the Quit command, and thus the Pop3State is never reset
properly.

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





-- 
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


Re: [twsocket] pop3 component not ready - Bug in TPop3Cli

2008-01-17 Thread retnyg

AG It helps alot to post a short message when you either think
AG the problem is resolved or not. Thanks.

it didnt fix the issue, got a pop3 not ready exception today.



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



 
 i also hope that the bug gets eliminated in the next release by
 FPIETTE.
 i don't really like using custom-patched components.



-- 
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


Re: [twsocket] pop3 component not ready - Bug in TPop3Cli

2008-01-17 Thread Arno Garrels
[EMAIL PROTECTED] wrote:
 AG It helps alot to post a short message when you either think
 AG the problem is resolved or not. Thanks.
 
 it didnt fix the issue, got a pop3 not ready exception today.

You did not provide any further information, not ready exceptions
may happen, i.e. due to incorrect component use. So I'm helpless.
I use TPop3Cli in an NT service application that checks for and
downloads mails in intervals since several years now w/o any problem.
However I'm starting a new session by calling Abort (to work around
the bug I mentioned), this works very reliable though it's not nice.

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


 
 
 
 AG --
 AG Arno Garrels [TeamICS]
 AG http://www.overbyte.be/eng/overbyte/teamics.html
 
 
 
 
 i also hope that the bug gets eliminated in the next release by
 FPIETTE.
 i don't really like using custom-patched components.
 
 
 
 --
 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


[twsocket] pop3 component not ready

2007-12-11 Thread retnyg
hi, i use a custom pop3 component in my program, and frome time to
time i get this errormessage from the server:

-ERR System temporarily unavailable, please try again later.

on the next connect try i get the pop3 component not ready exception,
even if i check for connected:

function TMailAlert.CheckError:boolean;
begin
  result := false;
  with fpop do
   if (errormessage  '') then begin
 if assigned(FOnError)  then
   FOnError(ErrorMessage);
 ClearErrorMessage;
 result := true;
   end;
end;

procedure TMailAlert.CheckNewMail;
begin
   with FPop do
   if not Connected then
   begin
 Fbusy := true;
 ClearErrorMessage;
 Connect;
   end;
end;

procedure TMailAlert.Pop3ClientRequestDone;
begin
  if (FPop.connected) and (CheckError) then begin
FPop.quit;
exit;
  end;  

...

what could be the cause that the component is not ready after the
error ?

TIA, retnyg


ps. pop3prot.pas Version:  2.27

-- 
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


Re: [twsocket] pop3 component not ready

2007-12-11 Thread Arno Garrels
[EMAIL PROTECTED] wrote:
 procedure TMailAlert.Pop3ClientRequestDone;
 begin
   if (FPop.connected) and (CheckError) then begin
 FPop.quit;
 exit;
   end;
 
 ...
 
 what could be the cause that the component is not ready after the
 error ?

After sending command Quit you should receive a server response.
When it's received you may either close or abort the connection 
yourself or wait until the server drops the connection.
Anyway start next connection attempt only when you are not connected,
means after SessionClosed fired.

--
Arno Garrels 

-- 
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