diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-04 17:39:06 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-04 17:39:06 +1100 |
commit | c17ce2e29e15c44b212d975ad1868453a8391acf (patch) | |
tree | 18eb5eaad3df2bef07ea440efbdf738b55b7fd50 /app/models | |
parent | f7c383f2579babafe0ad9e8832abd787fbe532f3 (diff) |
Update one method in RequestMailer to new mailer rails 3 api
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/request_mailer.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index 493d6961c..f07e3c3d8 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -76,15 +76,17 @@ class RequestMailer < ApplicationMailer def new_response(info_request, incoming_message) # Don't use login link here, just send actual URL. This is # because people tend to forward these emails amongst themselves. - url = main_url(incoming_message_url(incoming_message)) + @url = main_url(incoming_message_url(incoming_message)) + @incoming_message, @info_request = incoming_message, info_request - @from = contact_from_name_and_email - headers 'Return-Path' => blackhole_email, 'Reply-To' => @from, # not much we can do if the user's email is broken + headers 'Return-Path' => blackhole_email, 'Auto-Submitted' => 'auto-generated', # http://tools.ietf.org/html/rfc3834 'X-Auto-Response-Suppress' => 'OOF' - @recipients = info_request.user.name_and_email - @subject = _("New response to your FOI request - ") + info_request.title - @body = { :incoming_message => incoming_message, :info_request => info_request, :url => url } + mail(:from => contact_from_name_and_email, :to => info_request.user.name_and_email, + :subject => _("New response to your FOI request - ") + info_request.title, + :charset => "UTF-8", + # not much we can do if the user's email is broken + :reply_to => contact_from_name_and_email) end # Tell the requester that the public body is late in replying |