I've used PHPMailer before, but haven't run into this issue - it appears as though OpenSSL is returning the IP address for smtp.google.com
instead of the hostname. This would cause TLS to not work right?
It's not like the traffic is being manned in the middle because it's getting the right IP address, but it should be CN=smtp.gmail.com
instead of 108.177.112.XXX
.
I know a common problem is if the traffic is being sent somewhere else, but this isn't the case - it's the correct server it's just that PHPMailer
is receiving back the IP instead of the hostname.
!https://i.imgur.com/v2U9auK.png
CentOS 7.6
PHP 7.2.13
PHP OpenSSL 1.0.2k
I expect the debug output from PHPMailer to match both CN's as smtp.gmail.com