Depending on what mail program you use I would recommend another approach, which would also add restartability to your process.
I would recommend to move every processed mail to another location (eg folder in Outlook) and clean the inbox this way.
When the process starts it can scan the inbox for existing mails, regardless when they arrived because the mails in the inbox can only have arrived after the previous run.
If the process terminates for whatever reasons, you won't have to care about if you should consider this run's timestamp or take the previous run's timestamp, since it will not matter.
------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------