add noverify smtp option

pull/381/head
Pete Matsyburka 1 year ago committed by Oleksandr Turchyn
parent 9aa0a8ecbf
commit cf1b0a4c16

@ -38,7 +38,7 @@
<div class="form-control">
<%= ff.label :security_label, 'SMTP Security', class: 'label' %>
<div class="flex items-center space-x-6">
<% [%w[Auto none], %w[SSL ssl], %w[TLS tls]].each do |(label, val)| %>
<% [%w[Auto none], %w[SSL ssl], %w[TLS tls], %w[Noverify noverify]].each do |(label, val)| %>
<%= ff.label :security, value: val, for: "#{val}_radio", class: 'label' do %>
<%= ff.radio_button :security, val, checked: (value['security'].blank? && val == 'none') || value['security'] == val, id: "#{val}_radio", class: 'base-radio mr-2' %>
<%= label %>

@ -43,9 +43,9 @@ module ActionMailerConfigsInterceptor
address: value['host'],
port: value['port'],
domain: value['domain'],
openssl_verify_mode: OpenSSL::SSL::VERIFY_NONE,
openssl_verify_mode: value['security'] == 'noverify' ? OpenSSL::SSL::VERIFY_NONE : nil,
authentication: value['password'].present? ? value.fetch('authentication', 'plain') : nil,
enable_starttls_auto: true,
enable_starttls_auto: value['security'] != 'tls',
open_timeout: OPEN_TIMEOUT,
read_timeout: READ_TIMEOUT,
ssl: value['security'] == 'ssl',

Loading…
Cancel
Save