diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-03 15:11:28 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-03 15:11:49 +0100 |
commit | 1708f4a4c3f27e5bbbbb5818623dc1eb6688d2f0 (patch) | |
tree | b98cc9680aef34e4d67b4af9a205586cc1a50b2a /app/controllers/admin_request_controller.rb | |
parent | 4f501309ade230f65f4ba45e1d0161e89587d755 (diff) |
Log the reason why an incoming mail is routed to the holding pen, and display it to administrators. Closes #107.
Diffstat (limited to 'app/controllers/admin_request_controller.rb')
-rw-r--r-- | app/controllers/admin_request_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index d5bd4c4d6..a617b06df 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -275,7 +275,6 @@ class AdminRequestController < AdminController def show_raw_email @raw_email = RawEmail.find(params[:id]) - # For the holding pen, try to guess where it should be ... @holding_pen = false if (@raw_email.incoming_message.info_request == InfoRequest.holding_pen_request && !@raw_email.incoming_message.mail.from_addrs.nil? && @raw_email.incoming_message.mail.from_addrs.size > 0) @@ -303,6 +302,10 @@ class AdminRequestController < AdminController for address in addresses @info_requests += InfoRequest.guess_by_incoming_email(address) end + + # 3. Give a reason why it's in the holding pen + last_event = @raw_email.incoming_message.info_request.get_last_event + @rejected_reason = last_event.params[:rejected_reason] end end |