diff --git a/Gemfile b/Gemfile index bef461ac..dbe88cd4 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,6 @@ gem 'image_processing' gem 'jwt' gem 'lograge' gem 'mysql2', require: false -gem 'net-smtp', '0.4.0' gem 'oj' gem 'pagy' gem 'pg', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 5f559d89..f5e845ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,7 +79,7 @@ GEM arabic-letter-connector (0.1.1) ast (2.4.2) aws-eventstream (1.3.0) - aws-partitions (1.984.0) + aws-partitions (1.985.0) aws-sdk-core (3.209.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) @@ -242,7 +242,7 @@ GEM google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) - google-cloud-env (2.2.0) + google-cloud-env (2.2.1) faraday (>= 1.0, < 3.a) google-cloud-errors (1.4.0) google-cloud-storage (1.52.0) @@ -254,7 +254,7 @@ GEM google-cloud-core (~> 1.6) googleauth (~> 1.9) mini_mime (~> 1.0) - googleauth (1.11.0) + googleauth (1.11.1) faraday (>= 1.0, < 3.a) google-cloud-env (~> 2.1) jwt (>= 1.4, < 3.0) @@ -313,7 +313,7 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.7) minitest (5.25.1) - msgpack (1.7.2) + msgpack (1.7.3) multi_json (1.15.0) multipart-post (2.4.1) mutex_m (0.2.0) @@ -327,7 +327,7 @@ GEM net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.5.0) net-protocol nio4r (2.7.3) nokogiri (1.16.7) @@ -594,7 +594,6 @@ DEPENDENCIES letter_opener_web lograge mysql2 - net-smtp (= 0.4.0) oj pagy pg diff --git a/config/environments/production.rb b/config/environments/production.rb index aa655b6c..3e8fb4d5 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -87,7 +87,7 @@ Rails.application.configure do domain: ENV.fetch('SMTP_DOMAIN', nil), user_name: ENV.fetch('SMTP_USERNAME', nil), password: ENV.fetch('SMTP_PASSWORD', nil), - authentication: ENV.fetch('SMTP_AUTHENTICATION', 'plain'), + authentication: ENV.fetch('SMTP_PASSWORD', nil).present? ? ENV.fetch('SMTP_AUTHENTICATION', 'plain') : nil, enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] != 'false' }.compact end diff --git a/lib/action_mailer_configs_interceptor.rb b/lib/action_mailer_configs_interceptor.rb index 7c554e4b..ac5d01b5 100644 --- a/lib/action_mailer_configs_interceptor.rb +++ b/lib/action_mailer_configs_interceptor.rb @@ -44,7 +44,7 @@ module ActionMailerConfigsInterceptor port: value['port'], domain: value['domain'], openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE, - authentication: value.fetch('authentication', 'plain'), + authentication: value['password'].present? ? value.fetch('authentication', 'plain') : nil, enable_starttls_auto: true, open_timeout: OPEN_TIMEOUT, read_timeout: READ_TIMEOUT,