Topic: Email Alerts
I'm building a property listing site. People can search for properties based on, no beds, min price, max price, town, etc.
I need a way of people to be able to save their searches as email alerts/updates and send these out at set intervals, daily, weekly, whatever.
So I'm guessing I'd have an alert model that saves all of the info about a search, no_beds, minprice, bla and user_id, frequency, expires_at.
I'm also guessing that you would use cron to send out the emails.
But how would the alerts controller work? How would it know when to send the emails? All users would save alerts at different times so all alerts would have different created_at times and frequencies (daily, weekly). And would you have to update a field to say when the next send date will be?
I'm hoping someone has implemented something similar, I've looked everywhere and can't really find much info on doing something like this, but it is a crucial part of any property website really.
Any help is appreciated as always!