From: Andy Allan Date: Sat, 1 May 2010 11:36:22 +0000 (+0100) Subject: Move email configuration out of the model and into the config file X-Git-Tag: live~6303^2~1 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cd89a3c662c625db58aa1dd314fa601d06848225 Move email configuration out of the model and into the config file --- 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'