diff options
-rw-r--r-- | app/helpers/mailer_helper.rb | 4 | ||||
-rw-r--r-- | app/models/track_mailer.rb | 6 |
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 |