Plesk for Windows
kb: technical
ABT: Group B
Applicable to:
- Plesk for Windows
Symptoms
- WP-Mail-SMTP plugin is installed on WordPress site.
- It's not possible to send a test email WP Admin > Settings > Email > Send test:
CONFIG_TEXT: Warning: stream_socket_enable_crypto(): Peer certificate CN=`server.hostname.com' did not match expected CN=`localhost' in C:\Inetpub\vhosts\example.com\httpdocs\wp-includes\class-smtp.php on line 369
...
SMTP ERROR: Failed to connect to server: (0)SMTP connect() failed - Plugin is configured to use port 587 or 465: WP Admin > Settings > Email > SMTP Port
Cause
Incorrect SMTP Host is specified in plugin.
Resolution
Use server hostname(server.hostname.com) in WP Admin > Settings > Email > SMTP Host instead of localhost.
Hostname can be found at Plesk > Home page or in MailEnable > Services > localhost > Services and Connectors > SMTP Properties > General > Local domain name
Note: Mail server must be secured by SSL certificate .
Comments
2 comments
Thanks. This fixed my issue as my host was set to the hostname with mail. prepended to it.
Removing the mail prefix allowed the test email to be received in the mailbox.
The next question is why only the test email can be received.
Normal emails from outside the website are not received...
Hello William Brown
> Normal emails from outside the website are not received...
I would suggest checking the firewall if port 25 is opened.
Also, please, check that MX record for the corresponding domain point to the server.
In case this wouldn't help, consider contacting Plesk Support: https://support.plesk.com/hc/en-us/articles/213608509
Please sign in to leave a comment.