From c97fed7cc1863e0233c4332eadafbd8f9d64ea83 Mon Sep 17 00:00:00 2001 From: Paul Arterburn Date: Tue, 16 Jan 2024 23:26:05 -0100 Subject: [PATCH] Turn off emails to super bouncers --- app/controllers/email_events_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/email_events_controller.rb b/app/controllers/email_events_controller.rb index d76fc80b..de3d4ecf 100644 --- a/app/controllers/email_events_controller.rb +++ b/app/controllers/email_events_controller.rb @@ -32,7 +32,7 @@ def mailgun_params def process_bounce @user.increment(:emails_bounced) - @user.frequency = [] if @user.is_free? + @user.frequency = [] if @user.is_free? || @user.emails_bounced > 20 @user.save end