I just went through a very complex issue with this.
We were getting emails from our RoadRunner accounts thru Mail, but Gmail and AOL accounts were not coming through. We talked to both tech supports for a total of something over 25 hours, reaching up to Apple's executive level and RoadRunner's level 3 tech support.
It took getting fierce and demanding service— Road Runner said it was simply not possible to receive emails at the Apple Store but not get them at home. My wife took over, which probably helped. She could plead ignorance, actually a very strong negotiating position, where I knew a little bit and was sensitive when they laughed at me.
The upshot was that our wireless modem had some of Apple's ports shut down. See this list of ports:
http://support.apple.com/kb/TS1629?viewlocale=en_US&locale=en_US
Search it for Mail to see what needs to be open. Check with your ISP, probably not level 1 support but higher, and make sure that they are.
We are blessedly able to send and receive mail properly for the first time in months.