# Migration email hosting - SMTP fail

**URL:** https://meta.discourse.org/t/migration-email-hosting-smtp-fail/177160
**Category:** Self-hosting
**Created:** [January 25, 2021, 11:12am UTC](https://meta.discourse.org/t/migration-email-hosting-smtp-fail/177160 "2021-01-25T11:12:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dj1sklero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dj1sklero/32/179073_2.png) [@dj1sklero](https://meta.discourse.org/u/dj1sklero)
#### Post date: [January 25, 2021, 11:12am UTC](https://meta.discourse.org/t/migration-email-hosting-smtp-fail/177160/1 "2021-01-25T11:12:57Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [January 25, 2021, 5:59pm UTC](https://meta.discourse.org/t/migration-email-hosting-smtp-fail/177160/2 "2021-01-25T17:59:53Z")

</div>

> [@dj1sklero](#):
>
> OpenSSL :: SSL :: SSLError: hostname “mydomain” does not match the server certificate.

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.
