0
votes

I want to send email on a action & I want to deliver it later. I am using deliver_later method of ActionMailer but when the control reaches to this line

CustomerMailer.create_order_confirmation_mail(deal, deal.product.title, @user).deliver_later

It first sends the mail & render the view. How to send this mail later after rendering the view?

1
.deliver_later(queue: "test_queue") or .deliver_later(wait: 1.hour) this way you can tryRajarshi Das

1 Answers

1
votes

Using delayed_job gem and it will just look like:

CustomerMailer.delay.create_order_confirmation_mail(deal, deal.product.title, @user)

Delayed Job