aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/action_mailroom/mailbox.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/action_mailroom/mailbox.rb b/lib/action_mailroom/mailbox.rb
index de02e56f13..936054810f 100644
--- a/lib/action_mailroom/mailbox.rb
+++ b/lib/action_mailroom/mailbox.rb
@@ -8,7 +8,7 @@ class ActionMailroom::Mailbox
include Callbacks, Routing
attr_reader :inbound_email
- delegate :mail, to: :inbound_email
+ delegate :mail, :bounced!, to: :inbound_email
def self.receive(inbound_email)
new(inbound_email).perform_processing
@@ -37,7 +37,7 @@ class ActionMailroom::Mailbox
def track_status_of_inbound_email
inbound_email.processing!
yield
- inbound_email.delivered!
+ inbound_email.delivered! unless inbound_email.bounced?
rescue => exception
inbound_email.failed!
raise