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

Email rate limiter #1933

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Email rate limiter #1933

wants to merge 10 commits into from

Conversation

gowsik-ragunath
Copy link
Contributor

@gowsik-ragunath gowsik-ragunath commented Nov 11, 2024

Closes #1930

What changed:

  • Added a new setting page in admin dashboard to update the number of emails and interval length.
  • Added email rate limiter to the payment and invoice mailers.
  • By default 5 emails can be sent in 5 minutes, if email limit is crossed an error will be raised.

@gowsik-ragunath gowsik-ragunath changed the title [WIP] Email rate limiter Email rate limiter Nov 19, 2024
Copy link
Contributor

@keshavbiswa keshavbiswa left a comment

Choose a reason for hiding this comment

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

Looks good, few changes requested.

app/mailers/application_mailer.rb Outdated Show resolved Hide resolved
app/mailers/application_mailer.rb Outdated Show resolved Hide resolved
app/mailers/client_payment_mailer.rb Outdated Show resolved Hide resolved
spec/factories/users.rb Outdated Show resolved Hide resolved
@gowsik-ragunath gowsik-ragunath marked this pull request as ready for review November 20, 2024 14:12
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.

Add a rate limit on the number of emails we can send from the App per user account and make it configurable
2 participants