the smtp setting does not work in gitlab.rb after run gitlab-ctl reconfigure

  1. /etc/gitlab/gitlab.rb

Add the below lines

##configure smtp gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "mail.xxx.com" gitlab_rails['smtp_port'] = 456 gitlab_rails['smtp_user_name'] = "git@xxx.com" gitlab_rails['smtp_password'] = "xxx" gitlab_rails['smtp_domain'] = "xxx.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true

  1. run gitlab-ctl reconfigure

  2. cat gitlab.yml there is nothing about smtp configuration.

  3. test email function, it also does not work. project -- setting --service --Emails on push -- test setting.

question:

  1. how to configure smtp server and related info via gitlab.rb?

  2. how to configure the value of below keys in gitlab.yml via gitlab.rb?

Email settings

# Email address used in the "From" field in mails sent by GitLab
email_from: gitlab@xxx

# Email address of your support contact (default: same as email_from)
support_email: support@localhost