Commit 0d3dd338 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Add mail-smtp_pool gem and update sample config

Updates the sample config to contain an example for enabling SMTP pool
support
parent 04ad3ae3
......@@ -511,6 +511,7 @@ gem 'erubi', '~> 1.9.0'
# Monkey-patched in `config/initializers/mail_encoding_patch.rb`
# See https://gitlab.com/gitlab-org/gitlab/issues/197386
gem 'mail', '= 2.7.1'
gem 'mail-smtp_pool', '~> 0.1.0', path: 'vendor/gems/mail-smtp_pool', require: false
# File encryption
gem 'lockbox', '~> 0.6.2'
......
PATH
remote: vendor/gems/mail-smtp_pool
specs:
mail-smtp_pool (0.1.0)
connection_pool (~> 2.0)
mail (~> 2.7)
PATH
remote: vendor/shims/mimemagic
specs:
......@@ -1483,6 +1490,7 @@ DEPENDENCIES
loofah (~> 2.2)
lru_redux
mail (= 2.7.1)
mail-smtp_pool (~> 0.1.0)!
marginalia (~> 1.10.0)
memory_profiler (~> 0.9)
method_source (~> 1.0)
......
---
title: Add support for SMTP connection pooling when sending emails
merge_request: 57805
author:
type: added
......@@ -22,3 +22,28 @@ if Rails.env.production?
openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
}
end
# 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
#
# 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",
# domain: "gitlab.company.com",
# authentication: :login,
# enable_starttls_auto: true,
# openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
# )
# }
# end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment