Migration email hosting - SMTP fail

My problem started when I changed the hosting panel from ISPConfig to Plesk.
I have a discourse forum, in the new panel I created his e-mail address with the same name and password. I tried to send mail from this account and it works. The problem appears in the forum. When connected via port 587 (open in Plesk) he gets an error:

Wrapped OpenSSL :: SSL :: SSLError: hostname “mydomain” does not match the server certificate.

There is an error on port 465:

Jobs :: HandledExceptionWrapper: Wrapped Net :: ReadTimeout: Net :: ReadTimeout with # <TCPSocket: (closed)>.

Even telnet doesn’t connect to port 465:

root @ raspberrypi: / home / pi # telnet icegame.pl 465
Trying 161.97.82.2 …
Connected to icegame.pl.
Escape character is ‘^]’.

and port 587:

root@forum:~# telnet icegame.pl 587
Trying 161.97.82.2…
Connected to icegame.pl.
Escape character is ‘^]’.
220 hosting.krishost.pl ESMTP Postfix (Debian/GNU)

You need to have a valid SSL certificate for the domain you’re sending from. The problem it is showing here is that the domain doesn’t match which shouldn’t be too difficult to fix, Just use the correct certificate.