Hi Delphi Fans,

I have an project that collects email from my own email server and then 
processes these messages and then stores them in to a DB, it does this 
every few minutes by checking a pop account, this all works well except 
if the email server is not available.

This could be if the POP service is not running, but the server is still 
working, or for what ever reason.

My App will throw en exception (Socket error # 10054 - Connection reset 
by peer), whenever the email service is not available, which is correct, 
however I do not want my app to show this error, and to just to silently 
ignore this error and to keep trying to check every few minuets.

The code I have tried to use is as follows;

 try
 If IDPOP.Connected then IDPop.Disconnect;
   IDPop.connect;

// lots of processing


finally
  timer1.Enabled := true; // this is where i then rstart the process
  StaticText3.Caption := 'Good Emails -> '+ inttostr(goodemails);
  StaticText4.Caption := 'Total Emails -> '+ inttostr(totalemails);
  Screen.Cursor := CRDefault;
 end;


I have tried replacing this with a try ... except on e:exception block, 
but my app still shows the pop up error message.

So how can I stop the exception from generating the pop up error 
message, and to just keep working.

Thanks

Gorodn Waters


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to