markpcs Through mail client everything works regularly.
Are you running the mail client on the same machine as the webserver is running as? If not then it doesn't indicate anything one way or the other. Also you haven't told us how you have your mail client configured so we wouldn't be able to compare.
Regardless the connection is being refused by the mail server, you would have to look at the mail server / connection logs to find out why. If you do not have access to these logs then you would need to contact your host to have them look at the logs.
in your first screen shot you have IMAP on port 143. We don't know if your mailserver accepts connections on that port (no encryption). Many companies have moved away from allowing that. You would want to check if your host accepts that.
in your second screen shot you have IMAP + SSL selected and are using the port for POP3 over SSL. Which definitely will not work.