Skip to content

Commit

Permalink
Add settings to disable email sending from GitLab.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlazio committed Oct 27, 2014
1 parent 2f6856f commit d504ca8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/gitlab.yml.example
Expand Up @@ -39,6 +39,8 @@ production: &base
# time_zone: 'UTC'

## Email settings
# Uncomment and set to false if you need to disable email sending from GitLab (default: true)
# email_enabled: true
# Email address used in the "From" field in mails sent by GitLab
email_from: example@example.com

Expand Down
1 change: 1 addition & 0 deletions config/initializers/1_settings.rb
Expand Up @@ -95,6 +95,7 @@ def verify_constant(modul, current, default)
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['url'] ||= Settings.send(:build_gitlab_url)
Settings.gitlab['user'] ||= 'git'
Expand Down

0 comments on commit d504ca8

Please sign in to comment.