Sending email, but only once?

I’m working on an application that constantly monitors our copier for many different things. One thing I want to do is when the toner gets to 15% or below, I’d like it to send an email, but only one, so is there any way I can create a flag for each color toner that will only send an email once and reset the flag only after the toner is replaced (back to 100%)?

I guess I could create a txt file for each color after I send the email. If the file is present on the machine, don’t send, then when the toner level is back to 100%, delete the file. I won’t have access to any databases.

Surely there is a better way that will persist through PC restarts?

submitted by /u/smokeajay
[link] [comments]

Leave a Reply