My program needs to send about 600 emails out. As my ISP only allows 400 in each hour I need to send say 300 of them, wait for an hour and send another 300. I don't really want my program hung for an hour as the user might want to do something else with it while waiting. Better still, they might even want to shut it down.
Is there a way to delay for an hour whilst keeping the program responsive or even allowing it to be shut down and woken up to continue?
I found this which is helpful
[What is the best way to program a delay in Delphi?
but that declares a variable
var
SE: TSimpleEvent;
which Delphi 2009 does not understand
BTW if the answer involves threads please could you explain carefully or even give code as I have never used threads before (not knowingly anyway!)