These are the correct overrides for Symfony Mailer for my setup. Just replace the host, port username and password with your own. The 'Perform TLS peer verification' tickbox is dealt with on the last line - 'query_peer'. 'True' sets this checkbox to yes.
$config['symfony_mailer.mailer_transport.smtp']['configuration']['port']="1025";
$config['symfony_mailer.mailer_transport.smtp']['configuration']['host']="mail";
$config['symfony_mailer.mailer_transport.smtp']['configuration']['user']="";
$config['symfony_mailer.mailer_transport.smtp']['configuration']['pass']="";
$config['symfony_mailer.mailer_transport.smtp']['configuration']['query']['query_peer']=true;
If you do a drush config:get
on your production setup, you will get something like this:
www-bridge-user@a8e972098567:/var/www/html$ vendor/bin/drush config:get symfony_mailer.mailer_transport.smtp
uuid: a0c04a65-de79-4c81-9466-ad87c6ea1298
langcode: en
status: true
dependencies: { }
id: smtp
label: SMTP
plugin: smtp
configuration:
user: ''
pass: ''
host: your-smtp-host-name.com
port: 587
query:
verify_peer: true
local_domain: ''
restart_threshold: null
restart_threshold_sleep: null
ping_threshold: null
I used the same YML structure in creating a block for settings. Each indent is a new set of brackets after the top level key of symfony_mailer.mailer_transport.smtp
NOTE WELL: If you look at the UI or go a config:get, you will NOT see the overrides you have put in settings.php, so ensure you test this thoroughly.
Hope this helps others. Might be useful if you wish to keep your SMTP settings out of the UI as well.