aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-25 13:10:04 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-05-25 13:10:04 +0100
commit1367bf94eb1f6bfcf96f873b0c395326ac61670c (patch)
tree3b47992c32681da56194dcfeab3b75f215f29a3e
parent6e31257065dca23b60eb6e129d61434d75fda149 (diff)
Our default "from" details should be the CONTACT_* ones, not the TRACK_SENDER_* ones. This reverts part of commit 8a4a8feb9cfe0a77195943124112f0d284a7f9cd
-rw-r--r--app/helpers/mailer_helper.rb4
-rw-r--r--app/models/track_mailer.rb6
2 files changed, 8 insertions, 2 deletions
diff --git a/app/helpers/mailer_helper.rb b/app/helpers/mailer_helper.rb
index fe7de0edc..c0a950d47 100644
--- a/app/helpers/mailer_helper.rb
+++ b/app/helpers/mailer_helper.rb
@@ -1,7 +1,7 @@
module MailerHelper
def contact_from_name_and_email
- contact_name = MySociety::Config.get("TRACK_SENDER_NAME", 'Alaveteli')
- contact_email = MySociety::Config.get("TRACK_SENDER_EMAIL", 'contact@localhost')
+ contact_name = MySociety::Config.get("CONTACT_NAME", 'Alaveteli')
+ contact_email = MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost')
return "#{contact_name} <#{contact_email}>"
end
end
diff --git a/app/models/track_mailer.rb b/app/models/track_mailer.rb
index d3abd0489..f618fba49 100644
--- a/app/models/track_mailer.rb
+++ b/app/models/track_mailer.rb
@@ -26,6 +26,12 @@ class TrackMailer < ApplicationMailer
@body = { :user => user, :email_about_things => email_about_things, :unsubscribe_url => unsubscribe_url }
end
+ def contact_from_name_and_email
+ contact_name = MySociety::Config.get("TRACK_SENDER_NAME", 'Alaveteli')
+ contact_email = MySociety::Config.get("TRACK_SENDER_EMAIL", 'contact@localhost')
+ return "#{contact_name} <#{contact_email}>"
+ end
+
# Send email alerts for tracked things. Never more than one email
# a day, nor about events which are more than a week old, nor
# events about which emails have been sent within the last two