Danish M.
Danish M.

Reputation: 997

Using ActionMailer to send mail at chosen times?

So I'm trying to get my rails application to send particular emails at selected times, which are chosen by the user. Basically, in a form the user types in the subject and body of the email, and selects a Datetime to specify when he wishes that that email be sent. All of this information would be stored in a model.

How can I have rails send the email at the specified date and time? I've tried using the delayed_job gem, but haven't had much success.

Should I be using Cron jobs? Or is there a gem out there suited specifically for this task? Any help appreciated!

Upvotes: 3

Views: 1150

Answers (2)

Bhushan Lodha
Bhushan Lodha

Reputation: 6862

Resque would be good bet. here is railscasts for same.

Upvotes: 0

Sergey K
Sergey K

Reputation: 5107

Take a look at Clockwork gem or Whenever gem

Upvotes: 1

Related Questions