Wordpress Multisite email configuration


I’m having a problem configuring an email to use with a Wordpress form. The domain,, is part of a Wordpress multisite. My settings are: SMTP_PORT=587 SMTP_PASS=**********

I’m getting the following error:

*“SMTP Error: Could not connect to SMTP host.” This may also appear as SMTP connect() failed or Called Mail() without being connected in debug output. This is often reported as a PHPMailer problem, but it’s almost always down to local DNS failure, firewall blocking (for example as GoDaddy does) or another issue on your local network. It means that PHPMailer is unable to contact the SMTP server you have specified in the Host property, but doesn’t say exactly why. It can also be caused by not having the openssl extension loaded (See encryption notes below). *


Connection: opening to ssl://, timeout=300, options=array ( )Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number [/var/www/html/wp-includes/class-smtp.php line 298]Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/var/www/html/wp-includes/class-smtp.php line 298]Connection failed. Error #2: stream_socket_client(): unable to connect to ssl:// (Unknown error) [/var/www/html/wp-includes/class-smtp.php line 298]SMTP ERROR: Failed to connect to server: (0)SMTP connect() failed.

Can you help me?

Thanks in advance, Tiago


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


In case that you are using a firewall like UFW I would recommend trying to open port 587 for outgoing TCP traffic, you could do that with the following command:

sudo ufw deny out 587

Then test this again.

If this does not work then try using telnet to test if you can connect on port 587 to another server like

telnet 587

Let me know how it goes! Regards, Bobby