Say I have the following script on page.cfm. Everytime somebody comes to page.cfm, an e-mail is sent to me. So if 1000 people come to page.cfm, I get 1000 e-mails.
<cfmail to="joe@smith.com"
from="error@smith.com"
subject="Error"
type="text">
A person visited.
</cfmail>
I would like to limit it so I only get e-mails when the first 5 people visit in one day.
So if 2 people visit today, I get 2 e-mails. if 5 people visit I get 5, but if 100 people visit, I still get only 5 e-mails. And then the cycle continues the next day (if 2 people visit only 2 e-mails are send, but if 100 people visit only 5 e-mails are sent)
How can I do this with ColdFusion only? (without cfschedule)