View the original community article here
Last tested: April 2021
Check to see if TSL/SSL is enabled.
That error message means that the host you're connecting to, like foo.bar.com, has an SSL cert which is for a different host, like bob.bar.com. So in this case the mail server could have the wrong cert on it (not usually the case) or Looker had the wrong name.
One scenario is if you're using a mail server running on the same host as Looker. You could configure Looker to talk to localhost which is fine except that the SSL cert would be for something like mail.foo.com.
Another possibility is if the mail server is using a default, self-signed certificate with some bogus hostname. In that case if you want to use SSL you'd need to go get a real cert.