aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_mailer.rb7
-rw-r--r--app/models/track_mailer.rb6
2 files changed, 1 insertions, 12 deletions
diff --git a/app/models/application_mailer.rb b/app/models/application_mailer.rb
index 80f0d7289..044006f7c 100644
--- a/app/models/application_mailer.rb
+++ b/app/models/application_mailer.rb
@@ -9,17 +9,12 @@
class ApplicationMailer < ActionMailer::Base
# Include all the functions views get, as emails call similar things.
helper :application
+ include MailerHelper
# This really should be the default - otherwise you lose any information
# about the errors, and have to do error checking on return codes.
self.raise_delivery_errors = true
- def contact_from_name_and_email
- contact_name = MySociety::Config.get("CONTACT_NAME", 'Alaveteli')
- contact_email = MySociety::Config.get("CONTACT_EMAIL", 'contact@localhost')
- return "#{contact_name} <#{contact_email}>"
- end
-
def blackhole_email
MySociety::Config.get("BLACKHOLE_PREFIX", 'do-not-reply-to-this-address')+"@"+MySociety::Config.get("INCOMING_EMAIL_DOMAIN", "localhost")
end
diff --git a/app/models/track_mailer.rb b/app/models/track_mailer.rb
index f618fba49..d3abd0489 100644
--- a/app/models/track_mailer.rb
+++ b/app/models/track_mailer.rb
@@ -26,12 +26,6 @@ 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