Open Mail and go to the menu item 'Window' and in the drop down select "Connection Doctor". When this opens first select a printout and then try to connect again. The printout will then show you every step Mail is trying to reach the sever. This way you know why it is failing.