Is it possible to add a check certificate or validate certificate option to the SMTP server configuration? Just like it is in the Active Directory settings.
Phpmailer should have the following options to set:
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
]