I have been having similar problem with my Apple Mail. I have yahoo mail. I have tried changing the Incoming Mail settings several times. It is hit or miss. I go to Window - Connection Doctor, and they are all "green".
Maybe the problem is Yahoo Mail? When I go to Yahoo Mail on the internet, I can read my mail.
But now for 1 week, I am still having problems. Note: I upgraded to Mountain Lion about a month ago.