aboutsummaryrefslogtreecommitdiffstats
path: root/lib/action_mailbox/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action_mailbox/base.rb')
-rw-r--r--lib/action_mailbox/base.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/action_mailbox/base.rb b/lib/action_mailbox/base.rb
index 66a3b7fd32..3b12493662 100644
--- a/lib/action_mailbox/base.rb
+++ b/lib/action_mailbox/base.rb
@@ -8,7 +8,7 @@ class ActionMailbox::Base
include ActionMailbox::Callbacks, ActionMailbox::Routing
attr_reader :inbound_email
- delegate :mail, :bounced!, to: :inbound_email
+ delegate :mail, :delivered!, :bounced!, to: :inbound_email
delegate :logger, to: ActionMailbox
@@ -35,6 +35,11 @@ class ActionMailbox::Base
# Overwrite in subclasses
end
+ def finished_processing?
+ inbound_email.delivered? || inbound_email.bounced?
+ end
+
+
def bounce_with(message)
inbound_email.bounced!
message.deliver_later