There several possible causes for this issue:
1. The mail server is refusing connections. Unlikely in this case.
2. Something in the network, such as your router, a proxy server, or your ISP, is blocking the connection.
3. Third-party software that you installed is blocking the connection.
4. The settings for the mail account are wrong.
You may be able to narrow down these possibilities by means of the following tests or observations:
A. If another device on the same network can send or receive mail through the same server at the same time with what you're sure are the same settings, that rules out everything except 3.
B. If the problem is intermittent (sometimes it works, sometimes not) and you're not changing anything, that rules out 3 and 4.
C. If you can always use the account when connected to a different network, but never on this network, that rules out everything except 2.
D. If you can never get or send mail from any device on any network, with the correct server settings according to the mail service provider, that rules out everything except 1.
Please post the results of as many of the above tests as you can run.