Last post May 05, 2017 03:31 AM by Cathy Zou
May 03, 2017 01:17 PM|Jannah|LINK
Hello. I have some form on web site that return model to controller . Model have some three string properties: Name, Note and Email
visitors fill theese properties and push "send" button. Then the controller action resend visitors's Name, Note and Email to my Email.
How to prevent sending more than one message per day for each one web site visitor ?
May be there is some open function or solution for this ?
May 05, 2017 03:31 AM|Cathy Zou|LINK
For your problem, I suggest you could create datatable in database with Id,Username,Flag(default value is true.), Datetime(default value is a datetime before today date ) included in it.
Access Flag, Datetime form data base before send email. If (Flag is true and Datetime isn’t today date ) then user could send email.
After send successfully. Update Flag’s value to false and Datetime’s to today date time in database.