- It is not possible to configure SMTP server in Joomla:
PLESK_ERROR: SMTP Error: Could not connect to SMTP host.
- The following error can be found in domain error_log:
CONFIG_TEXT: mod_fcgid: stderr: Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=`example.com' did not match expected CN=`somedomain.tld'
Starting from PHP 5.6 stream wrapper now verify peer certificates and host names by default when using SSL/TLS. It means that:
- Connection will fail in case if self-signed certificate is used;
- In case when the certificate for mail is not the same as the domain name, connection will fail too.
There are two options to solve this:
- Secure mail server using Let's Encrypt certificate. To install it, use the following article: How to secure mail server with Let's Encrypt certificate.
Once it is installed, use a domain name everywhere it is used to secure mail. In most cases hosting providers use hostname of the server for that.
- In case it is needed to allow each domain owner to be able to specify their domain name, create multi-domain certificate and install it manually using the following article: How to configure certificate for SMTP, IMAP, and POP3 over SSL?
In this case it will be possible to connect using any domain name from the certificate.