Question

Good afternoon,

I'm trying to use Sidekiq/Redis to send emails in the background. I should note the following:

  1. I am using devise-async and it works with no issues

  2. My ActionMailer settings are good
    If I change my mailer calls to UserMailer.contact_email(name).deliver! The email sends just fine. What is not working is UserMailer.delay.contact_email(name)

  3. I can see the jobs going through in my logs, and you'd even go so far as to assume the mails were making it through. It was only when I sent to myself that I noticed it wasn't working:
    Apr 08 18:36:58 app01-production sidekiq: 2013-04-09T00:36:58Z 31155 TID-1jdwoq Sidekiq::Extensions::DelayedClass JID-6143790ebbf6e8bbc4a7bb85 INFO: done: 4.923 sec

It is obviously calling the DelayedClass extension on the mail object, but no-go. Given that devise-async works, I'm wondering if I am using the wrong syntax or something?`

Thanks!!

Was it helpful?

Solution 2

I hit into a similar issue too. I made a tiny change in the way the delayed extension calls #deliver.

Try this out: gem 'sidekiq', :git => "git@bitbucket.org:benjamintanweihao/sidekiq.git".

If this works out for you, then it might due to msg.from not being set.

The relevant code is here.

OTHER TIPS

Actually i have same problem when use rails 4 version. The solution above not working for me, i have check @benjamin repo and can't found it . So, i have try sidekiq mailer gem https://github.com/andersondias/sidekiq_mailer and get it work well!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top