- Plesk for Windows
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
Incorrect SMTP Host is specified in plugin.
Use server hostname(server.hostname.com) in WP Admin > Settings > Email > SMTP Host instead of localhost.
Hostname can be found at MailEnable > Services > localhost > Services and Connectors > SMTP Properties > General > Local domain name
Note: certificate for server.hostname.com must be valid.
Alternative solution by disabling STARTTLS is described at WordPress with SMTP extension cannot send mail.