diff options
author | francis <francis> | 2008-09-04 08:37:26 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-04 08:37:26 +0000 |
commit | bc25f87cb0e204b00f1ef6e4cf4dc249643437d3 (patch) | |
tree | 51f33a31be0ae81722f836509f597ade5737abf9 | |
parent | 42a33a9947e3db4398bfe5cf79b04822d4886857 (diff) |
Hooray, one less monkeypatch makes the world a better place.
-rw-r--r-- | app/models/contact_mailer.rb | 6 | ||||
-rw-r--r-- | config/environment.rb | 33 | ||||
-rw-r--r-- | todo.txt | 11 |
3 files changed, 13 insertions, 37 deletions
diff --git a/app/models/contact_mailer.rb b/app/models/contact_mailer.rb index b36d5f165..b35450cef 100644 --- a/app/models/contact_mailer.rb +++ b/app/models/contact_mailer.rb @@ -4,7 +4,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: contact_mailer.rb,v 1.6 2008-03-21 14:04:29 francis Exp $ +# $Id: contact_mailer.rb,v 1.7 2008-09-04 08:37:26 francis Exp $ class ContactMailer < ApplicationMailer @@ -18,7 +18,7 @@ class ContactMailer < ApplicationMailer } end - # We always set Reply-To when we set Sender to be different from From, + # We always set Reply-To when we set Return-Path to be different from From, # since some email clients seem to erroneously use the envelope from when # they shouldn't, and this might help. (Have had mysterious cases of a # reply coming in duplicate from a public body to both From and envelope @@ -29,7 +29,7 @@ class ContactMailer < ApplicationMailer @from = from_user.name_and_email # Do not set envelope from address to the from_user, so they can't get # someone's email addresses from transitory bounce messages. - headers 'Sender' => contact_from_name_and_email, # XXX perhaps change to being a black hole + headers 'Return-Path' => contact_from_name_and_email, # XXX perhaps change to being a black hole 'Reply-To' => @from @recipients = recipient_user.name_and_email @subject = subject diff --git a/config/environment.rb b/config/environment.rb index 771d5e5b6..66bf33e77 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -94,39 +94,6 @@ end # Domain for URLs (so can work for scripts, not just web pages) ActionController::UrlWriter.default_url_options[:host] = MySociety::Config.get("DOMAIN", 'localhost:3000') -# Monkeypatch! Set envelope from in ActionMailer. Code mostly taken from this -# Rails patch, with addition of using mail.from for sendmail if sender not set -# (the patch does that only for SMTP, when it clearly should consistently do it -# for both) -# http://dev.rubyonrails.org/attachment/ticket/7697/action_mailer_base_sender.diff -# Which is part of this ticket: -# http://dev.rubyonrails.org/ticket/7697 -module ActionMailer - class Base - def perform_delivery_smtp(mail) - destinations = mail.destinations - sender = mail.sender(nil) || mail.from - mail.ready_to_send - - Net::SMTP.start(smtp_settings[:address], smtp_settings[:port], smtp_settings[:domain], - smtp_settings[:user_name], smtp_settings[:password], smtp_settings[:authentication]) do |smtp| - smtp.sendmail(mail.encoded, sender, destinations) - end - end - - def perform_delivery_sendmail(mail) - sender = mail.sender(nil) || mail.from - - arguments = sendmail_settings[:arguments].dup - arguments += " -f \"#{sender}\"" - IO.popen("#{sendmail_settings[:location]} #{arguments}","w+") do |sm| - sm.print(mail.encoded.gsub(/\r/, '')) - sm.flush - end - end - end -end - # Monkeypatch! Method to remove individual error messages from an ActiveRecord. module ActiveRecord class Errors @@ -1,5 +1,4 @@ Rails migrate: -- check emails are being wrapped (gah) - check all monkey patches Test anti-spam bounce @@ -18,6 +17,11 @@ Site move: Next ==== +When tracking a person, send comments that they've made too? + +"The authority does not have the information (perhaps they suggest making the request elsewhere) " +- highlight only "not have", not "does"? + Maybe move "send followup" into actions? Call this @@ -82,6 +86,7 @@ CSS things - Need Icon for annotations in search results - Icon for government departments is too Parliamentary - Spacing on error boxes round form elements + - icons for "Things to do with this request" ? Merge workflow into one stream - find information, if you can't find it then request it. so just search is on front page, with popular stuff below a la Google Directory @@ -93,7 +98,9 @@ Google search within website of authority. Show similar requests after you have filed yours - maybe on preview too. Use spelling correction for public bodies search (in addition to substring?) +Add count of comments to admin summary page Flag bad comments, delete comments from admin interface + - perhaps via contact form, and form sending refering URL? Later ===== @@ -256,6 +263,8 @@ Quoting fixing TODO: http://www.whatdotheyknow.com/request/york_road_tube_re_opening_feasib#incoming-3509 http://www.whatdotheyknow.com/request/controlled_drinking_zones_5#incoming-4210 http://www.whatdotheyknow.com/request/road_and_junction_specifications#incoming-3598 + http://www.whatdotheyknow.com/request/disused_live_stations#incoming-4898 + http://www.whatdotheyknow.com/request/errors_in_list_of_postbox_locati#incoming-3577 http://www.whatdotheyknow.com/request/public_inspection_periods_for_lo_2#outgoing-1707 # square bracket in link |