fill out smtp settings

This commit is contained in:
Kiara Grouwstra 2021-12-07 23:16:29 +01:00
parent d3bd74f1ba
commit 0780a3440f
1 changed files with 8 additions and 21 deletions

View File

@ -29,27 +29,14 @@ module Ingang
config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"]
# Tell Action Mailer to use smtp server, if configured
config.action_mailer.delivery_method = ENV['SMTP_SERVER'].present? ? :smtp : :sendmail
ActionMailer::Base.smtp_settings =
if ENV['SMTP_AUTH'].present? && ENV['SMTP_AUTH'] != "none"
{
address: ENV['SMTP_SERVER'],
port: ENV["SMTP_PORT"],
domain: ENV['SMTP_DOMAIN'],
user_name: ENV['SMTP_USERNAME'],
password: ENV['SMTP_PASSWORD'],
authentication: ENV['SMTP_AUTH'],
enable_starttls_auto: ENV['SMTP_STARTTLS_AUTO'],
}
else
{
address: ENV['SMTP_SERVER'],
port: ENV["SMTP_PORT"],
domain: ENV['SMTP_DOMAIN'],
enable_starttls_auto: ENV['SMTP_STARTTLS_AUTO'],
}
end
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.flowmailer.net',
port: 587,
user_name: ENV['SMTP_USERNAME'],
password: ENV['SMTP_PASSWORD'],
authentication: 'plain',
enable_starttls_auto: true }
config.admin_name = ENV["INGANG_ADMIN_NAME"] || 'admin'
config.admin_password = ENV["INGANG_ADMIN_PASSWORD"] || ''