summaryrefslogtreecommitdiff
path: root/config/initializers/1_settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/1_settings.rb')
-rw-r--r--config/initializers/1_settings.rb24
1 files changed, 4 insertions, 20 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index ce0023e0795..e5ac66a2323 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -105,6 +105,10 @@ Settings.gitlab['https'] = false if Settings.gitlab['https'].nil?
Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80
Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
+Settings.gitlab['email_enabled'] ||= true if Settings.gitlab['email_enabled'].nil?
+Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
+Settings.gitlab['email_display_name'] ||= "GitLab"
+Settings.gitlab['email_reply_to'] ||= "noreply@#{Settings.gitlab.host}"
Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
Settings.gitlab['user'] ||= 'git'
Settings.gitlab['user_home'] ||= begin
@@ -131,26 +135,6 @@ Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitla
Settings.gitlab['restricted_signup_domains'] ||= []
#
-# Outgoing emails
-#
-Settings['outgoing_emails'] ||= Settingslogic.new({})
-Settings['outgoing_emails'].tap do |opts|
- # For backward compatibility. TODO remove in next major release.
- opts['enabled'] ||= Settings.gitlab['email_enabled']
- opts['from'] ||= Settings.gitlab['email_from']
- opts['display_name'] ||= Settings.gitlab['display_name']
- opts['reply_to'] ||= Settings.gitlab['email_reply_to']
-
- opts['enabled'] ||= opts['enabled'].nil?
- opts['display_name'] ||= "GitLab"
- opts['from'] ||= "gitlab@#{Settings.gitlab.host}"
- opts['reply_to'] ||= "noreply@#{Settings.gitlab.host}"
- opts['delivery_method'] ||= :sendmail
- opts['sendmail_settings'] ||= {}
- opts['smtp_settings'] ||= {}
-end
-
-#
# Gravatar
#
Settings['gravatar'] ||= Settingslogic.new({})