mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Don't pass invalid auth method "None" to net-smtp
It's our magic word to not pass username and password on.
This commit is contained in:
@@ -38,7 +38,13 @@ module Spree
|
||||
{ address: Config.mail_host,
|
||||
domain: Config.mail_domain,
|
||||
port: Config.mail_port,
|
||||
authentication: Config.mail_auth_type }
|
||||
authentication: }
|
||||
end
|
||||
|
||||
def authentication
|
||||
return unless need_authentication?
|
||||
|
||||
Config.mail_auth_type.presence
|
||||
end
|
||||
|
||||
def need_authentication?
|
||||
|
||||
@@ -23,7 +23,7 @@ module Spree
|
||||
it { expect(ActionMailer::Base.smtp_settings[:address]).to eq "smtp.example.com" }
|
||||
it { expect(ActionMailer::Base.smtp_settings[:domain]).to eq "example.com" }
|
||||
it { expect(ActionMailer::Base.smtp_settings[:port]).to eq 123 }
|
||||
it { expect(ActionMailer::Base.smtp_settings[:authentication]).to eq "None" }
|
||||
it { expect(ActionMailer::Base.smtp_settings[:authentication]).to eq nil }
|
||||
it { expect(ActionMailer::Base.smtp_settings[:enable_starttls_auto]).to be_truthy }
|
||||
|
||||
it "doesnt touch user name config" do
|
||||
|
||||
Reference in New Issue
Block a user