Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
QOTO
qoto
Commits
b52fdb4c
Unverified
Commit
b52fdb4c
authored
Jan 13, 2022
by
tkr
Committed by
GitHub
Jan 13, 2022
Browse files
Fix SMTP_ENABLE_STARTTLS_AUTO/SMTP_TLS/SMTP_SSL environment variables don't work (#17216)
#17215
parent
ea61d3ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/environments/production.rb
View file @
b52fdb4c
...
...
@@ -107,9 +107,9 @@ Rails.application.configure do
:authentication
=>
ENV
[
'SMTP_AUTH_METHOD'
]
==
'none'
?
nil
:
ENV
[
'SMTP_AUTH_METHOD'
]
||
:plain
,
:ca_file
=>
ENV
[
'SMTP_CA_FILE'
].
presence
||
'/etc/ssl/certs/ca-certificates.crt'
,
:openssl_verify_mode
=>
ENV
[
'SMTP_OPENSSL_VERIFY_MODE'
],
:enable_starttls_auto
=>
ENV
[
'SMTP_ENABLE_STARTTLS_AUTO'
]
||
true
,
:tls
=>
ENV
[
'SMTP_TLS'
].
presence
,
:ssl
=>
ENV
[
'SMTP_SSL'
].
presence
,
:enable_starttls_auto
=>
ENV
[
'SMTP_ENABLE_STARTTLS_AUTO'
]
!=
'false'
,
:tls
=>
ENV
[
'SMTP_TLS'
].
presence
&&
ENV
[
'SMTP_TLS'
]
==
'true'
,
:ssl
=>
ENV
[
'SMTP_SSL'
].
presence
&&
ENV
[
'SMTP_SSL'
]
==
'true'
,
}
config
.
action_mailer
.
delivery_method
=
ENV
.
fetch
(
'SMTP_DELIVERY_METHOD'
,
'smtp'
).
to_sym
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment