aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/request_mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/request_mailer.rb')
-rw-r--r--app/models/request_mailer.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb
index c6b99159e..0e1c2be12 100644
--- a/app/models/request_mailer.rb
+++ b/app/models/request_mailer.rb
@@ -4,15 +4,17 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_mailer.rb,v 1.1 2007-10-16 08:57:32 francis Exp $
+# $Id: request_mailer.rb,v 1.2 2007-10-24 11:39:37 francis Exp $
class RequestMailer < ActionMailer::Base
def initial_request(info_request, outgoing_message)
- @from = 'francis@flourish.org' # XXX
- @recipients = 'frabcus@fastmail.fm'
- # XXX check with staging site
- #@recipients = info_request.public_body.request_email
+ @from = info_request.user.email
+ if MySociety::Config.getbool("STAGING_SITE", 1)
+ @recipients = @from
+ else
+ @recipients = info_request.public_body.request_email
+ end
@subject = 'Freedom of Information Request - ' + info_request.title
@body = {:info_request => info_request, :outgoing_message => outgoing_message}
end