Files
computer-playbook/roles/web-app-gitlab/templates/config/smtp_settings.rb.j2

18 lines
726 B
Django/Jinja

Rails.application.config.action_mailer.delivery_method = :smtp
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
address: {{ GITLAB_EMAIL.host | ruby_dq }},
port: {{ GITLAB_EMAIL.port }},
{% if GITLAB_EMAIL.auth | bool %}
user_name: {{ GITLAB_EMAIL.username | ruby_dq }},
password: {{ GITLAB_EMAIL.password | ruby_dq }},
authentication: :login,
{% endif %}
domain: {{ GITLAB_EMAIL.domain | ruby_dq }},
{% if GITLAB_EMAIL_CA_FILE | length > 0 %}
ca_file: {{ GITLAB_EMAIL_CA_FILE | ruby_dq }},
{% endif %}
enable_starttls_auto: {{ GITLAB_EMAIL.start_tls | bool | string | lower }},
tls: {{ ((GITLAB_EMAIL.tls | bool) and not (GITLAB_EMAIL.start_tls | bool)) | string | lower }}
}