Commit f62bdc59 authored by Mario Manno's avatar Mario Manno

add config option to disable ssl/tls for smtp

parent 457dc775
......@@ -4,7 +4,14 @@ ActionMailer::Base.default_url_options = {
}
if ENV["SMTP_ADDRESS"]
%w(ADDRESS PORT DOMAIN USER_NAME PASSWORD).each do |setting|
next unless ENV["SMTP_#{setting}"]
next unless ENV["SMTP_#{setting}"].present?
ActionMailer::Base.smtp_settings[setting.downcase.to_sym] = ENV["SMTP_#{setting}"]
end
end
if ENV["SMTP_NOTLS"].present?
ActionMailer::Base.smtp_settings.merge!(
enable_starttls_auto: false,
ssl: false,
tls: false
)
end
......@@ -3,6 +3,7 @@ FRAB_HOST=localhost
FRAB_PROTOCOL=http
FROM_EMAIL=frab@localhost
SMTP_ADDRESS=localhost
SMTP_PORT=587
SMTP_USER_NAME
SMTP_PASSWORD
SMTP_PORT=25
SMTP_NOTLS=true
SMTP_USER_NAME=
SMTP_PASSWORD=
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