FIX: Don't set smtp authentication type when there's no user or password
... otherwise net-smtp, starting with 0.5.0, complains.
This commit is contained in:
parent
ccd493f23c
commit
897be75941
|
@ -31,12 +31,15 @@ Discourse::Application.configure do
|
|||
domain: GlobalSetting.smtp_domain,
|
||||
user_name: GlobalSetting.smtp_user_name,
|
||||
password: GlobalSetting.smtp_password,
|
||||
authentication: GlobalSetting.smtp_authentication,
|
||||
enable_starttls_auto: GlobalSetting.smtp_enable_start_tls,
|
||||
open_timeout: GlobalSetting.smtp_open_timeout,
|
||||
read_timeout: GlobalSetting.smtp_read_timeout,
|
||||
}
|
||||
|
||||
if settings[:password] || settings[:user_name]
|
||||
settings[:authentication] = GlobalSetting.smtp_authentication
|
||||
end
|
||||
|
||||
settings[
|
||||
:openssl_verify_mode
|
||||
] = GlobalSetting.smtp_openssl_verify_mode if GlobalSetting.smtp_openssl_verify_mode
|
||||
|
|
Loading…
Reference in New Issue