Disable async for specific emails
Closed this issue · 2 comments
waissbluth commented
Is it possible to enable/disable the async behavior on a case-by-case basis for each type of email? For example, to deliver confirmation emails without_delay
for users when signing up.
baschtl commented
Hmm, not specifically. I guess you could switch off devise async prior to sending the email and switching it on again afterwards:
Devise::Async.enabled = false
# Deliver email...
Devise::Async.enabled = true
This should enable the default behaviour of devise (cf. https://github.com/mhfs/devise-async/blob/master/lib/devise/async/model.rb#L28).
baschtl commented
Seems that the author was satisfied with the proposed solution.