diff options
author | Francis Irving <francis@mysociety.org> | 2010-09-22 11:58:29 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-09-22 11:58:29 +0100 |
commit | e0fea53b103ae80ad93ba4bf7eeceb83739b0848 (patch) | |
tree | 4708491e6c4087f83f42e114b2b9fae21fee135e | |
parent | 560de768d4a883d37f122bcd1698ddc380ed80b4 (diff) |
Explain why we want to record the original raw email
-rw-r--r-- | app/models/request_mailer.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index 7e2041b4f..910f38cbe 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -177,7 +177,15 @@ class RequestMailer < ApplicationMailer # Class function, called by script/mailin with all incoming responses. # [ This is a copy (Monkeypatch!) of function from action_mailer/base.rb, # but which additionally passes the raw_email to the member function, as we - # want to record it. ] + # want to record it. + # + # That is because we want to be sure we properly record the actual message + # received in its raw form - so any information won't be lost in a round + # trip via TMail, or by bugs in it, and so we can use something other than + # TMail at a later date. And so we can offer an option to download the + # actual original mail sent by the authority in the admin interface (so + # can check that attachment decoding failures are problems in the message, + # not in our code). ] def self.receive(raw_email) logger.info "Received mail:\n #{raw_email}" unless logger.nil? mail = TMail::Mail.parse(raw_email) |