Here are some common error messages which most developers encounter while integrating SMTP in their Wordpress plugin:
- SMTP Connection Timeout
- Unable to connect to SMTP host
- SMTP Error: Could not connect to SMTP host
- SMTP connect() failed
- SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
- SMTP ERROR: Failed to connect to server
- SMTP ERROR: Failed to connect to server: Connection refused
If you have encountered any of the above error messages, then you are at the right place for the solution.
In 90% of the cases, if you are on a shared hosting server, the ports 25 and 587 remain blocked. This block is been purposely done by your hosting provider. This is true even for some of the dedicated servers also. When these ports are blocked, try to connect using port 2525. If you find that port is also blocked with same error message, then the only solution is to contact your hosting provider to either unblock these outgoing SMTP ports
Use Pepipost API Plugin: Unlike other WP plugins, this Pepipost plugin doesn't use SMTP ports to send emails. Instead, it connects over HTTP protocol to send your WordPress emails. Hence, no need to anymore worry about port block issues.
Simply install Pepipost API Plugin and enjoy a hassle free email integration. Just configure your Pepipost API key and verified sender domain to start sending emails.