Deliver password reset email inline #882
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit changes the delivery behavior of the password reset email.
Before, it queued the email for later delivery.
Now, it delivers the email immediately.
The queue can be backed up, have no running workers, or other issues.
These issues can cause delay or no email delivery,
leading the user to abandon the site or contact support.
In the case of no delivery, there is also no error trace.
Inlining delivery also lets the programmer handle error cases such as
the email delivery service experiencing downtime or degraded service
or the email delivery service responding that it can't deliver the email
(such as a badly formatted or non-existent email address).
Handling these errors can help the user fix their own typos, etc.
Lastly, a project that integrates Clearance no longer needs to have
an ActiveJob-compatible background job process in their project.
https://api.rubyonrails.org/classes/ActionMailer/MessageDelivery.html#method-i-deliver_now