If you are setting up your WordPress site with a SMTP plugin or using the PHPMailer library for sending email from your web server, you might encounter this SMTP Error: Failed to connect to server: Connection refused (111)/Network is unreachable (101). It’s a common connectivity issue on most shared hosting servers. In this post we will explain the issue in detail and show you how you can resolve it to have a fully functional email/SMTP setup.