Skip to content
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

Deliver password reset email inline #882

Merged
merged 1 commit into from
Aug 14, 2020
Merged

Deliver password reset email inline #882

merged 1 commit into from
Aug 14, 2020

Conversation

croaky
Copy link
Contributor

@croaky croaky commented Jan 25, 2020

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

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
a background job process in their project.

https://api.rubyonrails.org/classes/ActionMailer/MessageDelivery.html#method-i-deliver_now
@croaky
Copy link
Contributor Author

croaky commented Jul 24, 2020

Sync'ed with upstream. Thoughts?

Copy link
Contributor

@composerinteralia composerinteralia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes a lot of sense to me. I will chat with a couple other folks before merging.

@gnfisher gnfisher merged commit dcb96dc into thoughtbot:master Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants