gitlab_rails['smtp_enable']=truegitlab_rails['smtp_address']="smtp.server"gitlab_rails['smtp_port']=465gitlab_rails['smtp_user_name']="smtp user"gitlab_rails['smtp_password']="smtp password"gitlab_rails['smtp_domain']="example.com"gitlab_rails['smtp_authentication']="login"gitlab_rails['smtp_enable_starttls_auto']=truegitlab_rails['smtp_openssl_verify_mode']='peer'# If your SMTP server does not like the default 'From: gitlab@localhost' you# can change the 'From' with this setting.gitlab_rails['gitlab_email_from']='gitlab@example.com'gitlab_rails['gitlab_email_reply_to']='noreply@example.com'

Example configuration

SMTP on localhost

This configuration, which simply enables SMTP and otherwise uses the default settings, can be used for an MTA running on localhost that does not provide a sendmail interface or that provides a sendmail interface that is incompatible with GitLab, such as Exim.

gitlab_rails['smtp_enable']=true

SMTP without SSL

By default SSL is enabled for SMTP. If your SMTP server do not support communication over SSL use following settings:

Gmail

Note:
Gmail has strict sending limits
that can impair functionality as your organization grows. We strongly recommend using a
transactional service like SendGrid or Mailgun
for teams using SMTP configuration.

More examples are welcome

If you have figured out an example configuration yourself please send a Merge
Request to save other people time.

Testing the SMTP configuration

You can verify GitLab's ability to send emails properly using the Rails console.
On the GitLab server, execute gitlab-rails console to enter the console. Then,
you can enter the following command at the console prompt to cause GitLab to
send a test email: