debian-mirror-gitlab/config/initializers/smtp_settings.rb.sample

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
2.3 KiB
Text
Raw Normal View History

2015-04-26 12:48:37 +05:30
# To enable smtp email delivery for your GitLab instance do the following:
2014-09-02 18:07:02 +05:30
# 1. Rename this file to smtp_settings.rb
# 2. Edit settings inside this file
# 3. Restart GitLab instance
#
2015-04-26 12:48:37 +05:30
# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
#
2021-04-29 21:17:54 +05:30
# If you change this file in a merge request, please also create a merge request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
2015-04-26 12:48:37 +05:30
2014-09-02 18:07:02 +05:30
if Rails.env.production?
2015-12-23 02:04:40 +05:30
Rails.application.config.action_mailer.delivery_method = :smtp
2021-10-27 15:23:28 +05:30
secrets = Gitlab::Email::SmtpConfig.secrets
2014-09-02 18:07:02 +05:30
2016-08-24 12:49:21 +05:30
ActionMailer::Base.delivery_method = :smtp
2014-09-02 18:07:02 +05:30
ActionMailer::Base.smtp_settings = {
address: "email.server.com",
2016-04-02 18:10:28 +05:30
port: 465,
2014-09-02 18:07:02 +05:30
user_name: "smtp",
password: "123456",
2021-10-27 15:23:28 +05:30
## If you are using encrypted smtp credentials then you should instead use the secrets user_name/password
## See: https://docs.gitlab.com/ee/administration/raketasks/smtp.html#secrets
# user_name: secrets.username,
# password: secrets.password,
2014-09-02 18:07:02 +05:30
domain: "gitlab.company.com",
authentication: :login,
2015-04-26 12:48:37 +05:30
enable_starttls_auto: true,
openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
2014-09-02 18:07:02 +05:30
}
end
2021-04-29 21:17:54 +05:30
# To use an SMTP connection pool, uncomment the following section:
#
# require 'mail/smtp_pool'
#
# ActionMailer::Base.add_delivery_method :smtp_pool, Mail::SMTPPool
#
# if Rails.env.production?
# Rails.application.config.action_mailer.delivery_method = :smtp_pool
2021-10-27 15:23:28 +05:30
# secrets = Gitlab::Email::SmtpConfig.secrets
2021-04-29 21:17:54 +05:30
#
# ActionMailer::Base.delivery_method = :smtp_pool
# ActionMailer::Base.smtp_pool_settings = {
# pool: Mail::SMTPPool.create_pool(
# pool_size: Gitlab::Runtime.max_threads,
# address: "email.server.com",
# port: 465,
# user_name: "smtp",
# password: "123456",
2021-10-27 15:23:28 +05:30
# ## If you are using encrypted smtp credentials then you should instead use the secrets user_name/password
# ## See: https://docs.gitlab.com/ee/administration/raketasks/smtp.html#secrets
# # user_name: secrets.username,
# # password: secrets.password,
2021-04-29 21:17:54 +05:30
# domain: "gitlab.company.com",
# authentication: :login,
# enable_starttls_auto: true,
# openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
# )
# }
# end