Depending on your situation, there can be multiple reasons why this error occurs. So, please try to go through the different scenarios below:
- Your SMTP server might be using a different connection method. If so, try defining it manually. For example, if your SMPT is using TLS, you can enter "587, TLS" (enter your port number and enter it without the double quotes) in the General Settings page, Account tab, Port input field.
- If you're using a shared hosting provider, they might restrict SMTP usage.
- SELinux blocking issue.
- SSL support issue with PHP.
- The IPv6 blocking issue.
- Using godaddy as the hosting provider.
- Other reasons.
Please consult with your hosting or SMTP provider for further details since it may differ for each.