Unread email notifier, most practical approach
Posted
by Michael Pasqualone
on Stack Overflow
See other posts from Stack Overflow
or by Michael Pasqualone
Published on 2010-06-14T02:38:47Z
Indexed on
2010/06/14
2:42 UTC
Read the original article
Hit count: 224
I'm in the process of writing a small php-cli script that will loop over over my personal inbox and then send me an SMS via a gateway.
The question I have is:
As will have the script launch via cron every 10 minutes, if there is an email sitting in my inbox that is not read before the next script launch then I will receive 2 sms.
Does any one (pseudocode will do) have any idea what the best practice would be in php5 to ensure only 1 SMS is sent?
What I am currently learning towards is towards storing the message ID in a sqlite DB and flagging a field whether an SMS has been sent or not - but wondering if there is an easier way?
© Stack Overflow or respective owner