I want to send an email just once per day. There There is one button and any user can click that button. So The email must not be send 2 timessent twice. When When the first user clickclicks the button then, the email is send and ifsent. If some other user clickclicks the button than, the email will not be sendsent again.
This is how I implemented, and it’sit's working. There There are some cases, once a month, when 2 email are sent, but I don't know why.
I am sure that there is more elegant way to resolve this problem. Please share with me your ideas. I am sure that there is more elegant way to resolve this problem. Please share with me your ideas.
Edit:
IsSentIsSent
function