Skip to main content
edited tags; edited tags
Link
200_success
  • 144.2k
  • 22
  • 188
  • 473
added 3 characters in body; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Send Emailemail just once per day

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

Send Email just once

I want to send an email just once per day. There is one button and any user can click that button. So email must not be send 2 times. When first user click button then email is send and if some other user click button than email will not be send again.

This is how I implemented and it’s working. 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.

Edit: IsSent function

Send email just once per day

I want to send an email just once per day. There is one button and any user can click that button. The email must not be sent twice. When the first user clicks the button, the email is sent. If some other user clicks the button, the email will not be sent again.

This is how I implemented, and it's working. 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.

IsSent function

edited tags
Link
RubberDuck
  • 30.9k
  • 6
  • 71
  • 174
Tweeted twitter.com/#!/StackCodeReview/status/504266477877596160
added 1023 characters in body
Source Link
Raskolnikov
  • 812
  • 2
  • 11
  • 25
Loading
added 7 characters in body; edited title
Source Link
Marc-Andre
  • 6.7k
  • 5
  • 38
  • 65
Loading
Removing unnecessary whitespace.
Source Link
Ocelot20
  • 1.9k
  • 11
  • 18
Loading
Source Link
Raskolnikov
  • 812
  • 2
  • 11
  • 25
Loading