Topic: Sending Dynamic Email Reminders

Hello, all. I'm relatively new to actionmailer however I have set up forgot password emails and have them running as delayed jobs already. I would like to set up dynamic email reminders where users can select options like "Remind me ___ minutes/hours/days" before an event start and have it send an email reminder. I don't want to leave it completely open-ended and will have a dropdown with the following options:

    Remind me at the time of event
    Remind me 5/15/30 minutes before the event
    Remind me 1 hour before the event
    Remind me 1 day before the event

What is the best/most efficient way to accomplish this? Can the delayed jobs run_at function accomplish this? I want the email to send at something like:

event_start - 60.minutes

et cetera. My app is using Rails 3.0.11 and this is different from a daily cron task because these could run at any time. Also, will it cause any problems with the delayed jobs if a user is able to edit the event dates changing the start and end dates?

Last edited by RobertM (2012-10-19 14:24:14)