From cd89a3c662c625db58aa1dd314fa601d06848225 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Sat, 1 May 2010 12:36:22 +0100 Subject: [PATCH 1/1] Move email configuration out of the model and into the config file --- app/models/notifier.rb | 4 ++-- config/environment.rb | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/notifier.rb b/app/models/notifier.rb index df30d651b..41734bb5b 100644 --- a/app/models/notifier.rb +++ b/app/models/notifier.rb @@ -99,8 +99,8 @@ private def common_headers(recipient) recipients recipient.email locale recipient.preferred_language_from(I18n.available_locales) - from "OpenStreetMap " - headers "return-path" => "bounces@openstreetmap.org", + from EMAIL_FROM + headers "return-path" => EMAIL_RETURN_PATH, "Auto-Submitted" => "auto-generated" end diff --git a/config/environment.rb b/config/environment.rb index 539af83b2..018e97451 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -13,6 +13,10 @@ SERVER_URL = ENV['OSM_SERVER_URL'] || 'www.openstreetmap.org' # Set the generator GENERATOR = ENV['OSM_SERVER_GENERATOR'] || 'OpenStreetMap server' +# Settings for generated emails (e.g. signup confirmation +EMAIL_FROM = ENV['OSM_EMAIL_FROM'] || 'OpenStreetMap ' +EMAIL_RETURN_PATH = ENV['OSM_EMAIL_RETURN_PATH'] || 'bounces@openstreetmap.org' + # Application constants needed for routes.rb - must go before Initializer call API_VERSION = ENV['OSM_API_VERSION'] || '0.6' -- 2.45.2