smtp_settings.rb.in 907 Bytes
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/smtp_settings.rb.sample
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/smtp_settings.rb.erb
# (last updated for omnibus-gitlab 8.2.3+ce.0-0-g8eda093)

<% rails_app = @app == 'gitlab' ? 'Gitlab' : 'GitlabCi' %>
<% container = @app == 'gitlab' ? 'gitlab-rails' : 'gitlab-ci' %>

if Rails.env.production?
  <%= rails_app %>::Application.config.action_mailer.delivery_method = :smtp

  ActionMailer::Base.smtp_settings = {
    authentication: <%= @smtp_authentication.to_s.to_sym.inspect %>,
<% %w{ address port user_name password domain enable_starttls_auto tls openssl_verify_mode ca_path ca_file }.each do |key| %>
  <% value = node['gitlab'][container]["smtp_#{key}"] %>
    <%= "#{key}: #{value.inspect}," unless value.nil? %>
<% end %>
  }
end