Commit 584117aa87cbb9c3bc4c43f962fa86bbdda04d25
Exists in
master
and in
4 other branches
Merge branch 'smtp_settings' of /home/git/repositories/gitlab/gitlabhq
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
config/initializers/smtp_settings.rb.sample
| 1 | 1 | # To enable smtp email delivery for your GitLab instance do next: |
| 2 | -# 1. Change config/environments/production.rb to use smtp | |
| 3 | -# config.action_mailer.delivery_method = :smtp | |
| 4 | -# 2. Rename this file to smtp_settings.rb | |
| 5 | -# 3. Edit settings inside this file | |
| 6 | -# 4. Restart GitLab instance | |
| 2 | +# 1. Rename this file to smtp_settings.rb | |
| 3 | +# 2. Edit settings inside this file | |
| 4 | +# 3. Restart GitLab instance | |
| 7 | 5 | # |
| 8 | -if Gitlab::Application.config.action_mailer.delivery_method == :smtp | |
| 6 | +if Rails.env.production? do | |
| 7 | + Gitlab::Application.config.action_mailer.delivery_method = :smtp | |
| 8 | + | |
| 9 | 9 | ActionMailer::Base.smtp_settings = { |
| 10 | 10 | address: "email.server.com", |
| 11 | 11 | port: 456, | ... | ... |