From 3e6bf84fa8743803b8995e0ebfe25dc1b9bb75cc Mon Sep 17 00:00:00 2001 From: francis Date: Mon, 14 Jan 2008 12:22:36 +0000 Subject: Put name (as well as email) in all addresses when sending emails. --- app/models/info_request.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/models/info_request.rb') 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) -- cgit v1.2.3