-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support deferred Mailer delivery with deliver_later
#5610
base: main
Are you sure you want to change the base?
Conversation
c86bc21
to
4170a05
Compare
deliver_later
deliver_later
@seanpdoyle Do you think we would be able to get this PR merged? Asking this as I am not seeing any activity on this PR. |
4170a05
to
5e4f206
Compare
@carlosantoniodasilva could you approve the CI workflow for this PR? |
@seanpdoyle Approved it, but there are some test failures in main that I've been looking into, due to some recent merges. No need to worry about those, I hope to get everything green again soon. (I'm off traveling though, so it might take another couple weeks to circle back on it) As for the change, I've been wanting to make "later" the default for a while, the current way things work aren't great. I'm not sure about that being an option, haven't given it much thought honestly, but could be a way to migrate over to a new default behavior more easily. Thanks for the PR! |
5e4f206
to
b585c19
Compare
Re-opens [heartcombo#4224][] By default, all `Devise::Models::Authenticatable`-initiated Action Mailer deliveries are transmitted immediately (within the request-response cycle). Transmitting emails and interacting with any third-party services over SMTP or HTTP risk service outages and other types of network-related failures. This commit adds support for deferring delivery to be done from an Action Job background worker queue through the [deliver_later][] method. ```ruby # config/initializers/devise.rb Devise.mailer_delivery_method = :deliver_later ``` [heartcombo#4224]: heartcombo#4224 [deliver_now]: https://edgeapi.rubyonrails.org/classes/ActionMailer/MessageDelivery.html#method-i-deliver_now [deliver_later]: https://edgeapi.rubyonrails.org/classes/ActionMailer/MessageDelivery.html#method-i-deliver_later
I was also looking for this exact option. The implementation looks pretty straight-forward. Can we get this merged? |
Re-opens #4224
By default, all
Devise::Models::Authenticatable
-initiated Action Mailer deliveries are transmitted immediately (within the request-response cycle).Transmitting emails and interacting with any third-party services over SMTP or HTTP risk service outages and other types of network-related failures.
This commit adds support for deferring delivery to be done from an Action Job background worker queue through the deliver_later method.