Pomohlo:
# SMTP
$config['smtp_server'] = 'ssl://mail.server.tld'; # maybe localhost works too
$config['smtp_port'] = 465;
$config['smtp_timeout'] = 5;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';
$config['smtp_conn_options'] = [
'ssl' => [
'verify_peer' => true,
'verify_depth' => 3,
'peer_name' => 'mail.server.tld',
'cafile' => '/etc/ssl/certs/ca-certificates.crt'
],
];