SMTP configuration not used
welearnednothing opened this issue · 0 comments
welearnednothing commented
When configuring the mail settings to use SMTP, the settings are being applied to ActionMailer::Base as a hash with string keys, which at mail time aren't recognized and the defaults are used instead (sitting alongside the configured options as symbolized keys).
For example. if I add
puts mail.to_yaml
into notification_mailer.rb, I'll see the following for SMTP settings:
'@delivery_method': !ruby/object:Mail::SMTP
settings:
:address: localhost
:port: 25
:domain: localhost.localdomain
:user_name:
:password:
:authentication:
:enable_starttls_auto: true
:openssl_verify_mode:
:ssl:
:tls:
address: my.mail.com
port: 25
domain: disney.com
user_name:
password:
authentication: none
enable_starttls_auto: false
where the symbolized keys will be used, not the string keys from the config.
Given that default_url_options for the mailer are symbolized, it seems like we should be doing the same for SMTP options. PR to follow.