diff options
author | francis <francis> | 2008-01-14 12:22:36 +0000 |
---|---|---|
committer | francis <francis> | 2008-01-14 12:22:36 +0000 |
commit | 3e6bf84fa8743803b8995e0ebfe25dc1b9bb75cc (patch) | |
tree | a3a748f112238cfe811cbf5f2aeebfa8171be119 /app/models/info_request.rb | |
parent | 56e8b64cb30171cee4a8c279af3f9d6b8627b23b (diff) |
Put name (as well as email) in all addresses when sending emails.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 198c6a30f..847a30cc0 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -17,7 +17,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.26 2008-01-10 01:13:28 francis Exp $ +# $Id: info_request.rb,v 1.27 2008-01-14 12:22:36 francis Exp $ require 'digest/sha1' @@ -41,12 +41,18 @@ public def incoming_email return self.magic_email("request-") end + def incoming_name_and_email + return "GovernmentSpy <" + self.incoming_email + ">" + end # Modified version of incoming_email to use in the envelope from, for # bounce messages. def envelope_email return self.magic_email("request-bounce-") end + def envelope_name_and_email + return "GovernmentSpy <" + self.envelope_email + ">" + end # Return info request corresponding to an incoming email address, or nil if # none found. Checks the hash to ensure the email came from the public body - @@ -189,6 +195,9 @@ public return self.public_body.request_email end end + def recipient_name_and_email + return "FOI requests at " + self.public_body.short_name + " <" + self.recipient_email + ">" + end # History of some things that have happened def log_event(type, params) |