Ask A Question


You’re not receiving notifications from this thread.

Sidekiq + Action Mailer

Michael Kogan asked in Rails

I study Ruby on Rails and I have a one-page simple application that will send emails to people. In the form on the page, a person enters the time and date when he wants to send an email.
deliver_now works for me but when I want to send it by deliver_later in 2 minutes for example (not yet by date) it doesn't. There is a link to the code.


Hey Michael..Sidekiq allows you to schedule the time when a job will be executed, and so does Active Job, through deliver_later ( Active Job is integrated with Action Mailer, so try to enqueue the delayed delivery through Active Job instead of Sidekiq.


UsersMailer.remind_email(@user).deliver_later(wait: 2.minutes)


Thanks for the answer ! Now it works. Now I want to send it by users date and time and it doesn't send. It also doesn't save the date to db.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,256+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.