mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
strip out nil settings from config
This commit is contained in:
parent
95c4bf4cfa
commit
bac2d21382
1 changed files with 3 additions and 1 deletions
|
@ -33,7 +33,7 @@ Discourse::Application.configure do
|
|||
config.i18n.fallbacks = true
|
||||
|
||||
if GlobalSetting.smtp_address
|
||||
config.action_mailer.smtp_settings = {
|
||||
settings = {
|
||||
address: GlobalSetting.smtp_address,
|
||||
port: GlobalSetting.smtp_port,
|
||||
domain: GlobalSetting.smtp_domain,
|
||||
|
@ -41,6 +41,8 @@ Discourse::Application.configure do
|
|||
authentication: 'plain',
|
||||
enable_starttls_auto: GlobalSetting.smtp_enable_start_tls
|
||||
}
|
||||
|
||||
config.action_mailer.smtp_settings = settings.reject{|x,y| y.nil?}
|
||||
else
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
config.action_mailer.sendmail_settings = {arguments: '-i'}
|
||||
|
|
Loading…
Reference in a new issue