SMTP connect() failed, WordPress

Hi

I have problem with SMTP.

On the same server as the SMTP account it works, but when I enter the server address as localhost.

But when I connect to another WordPress on another server with SMTP mail.domain.com, this error:

SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub

But when I test by online testers from google, it works. I don’t understand why that is.

Check the error that the SMTP plugin is reporting and check the exim logs at the same time