From b25948bd5092026ae70b88954acbb11b133c889c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 27 Sep 2018 16:44:41 -0700 Subject: Make an email that fails to deliver to a mailbox as bounced Probably need a way to either provide more email on the nature of a bounce or have a separate status code for "undeliverable". --- lib/action_mailroom/router.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/action_mailroom/router.rb b/lib/action_mailroom/router.rb index fb0b638978..29ba803e03 100644 --- a/lib/action_mailroom/router.rb +++ b/lib/action_mailroom/router.rb @@ -19,6 +19,8 @@ class ActionMailroom::Router if mailbox = match_to_mailbox(inbound_email) mailbox.receive(inbound_email) else + inbound_email.bounced! + raise RoutingError end end -- cgit v1.2.3