The function works only if I add "verify_peer_name", too.
add_filter('wp_mail_smtp_custom_options','my_wp_mail_smtp_custom_options');
function my_wp_mail_smtp_custom_options($phpmailer) {
$phpmailer->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
]
];
return $phpmailer;
}
Thanks!