I have a 2 gmail, imap enabled accounts and I also was able to send, but not received.
I found the information from the following site helpful: kb.mediatemple.net/questions/230/Common+issues+with+Apple+Mail#gs/not-able-to-s end-email
Reset Mail's preferences
The IMAP prefix settings are stored in the account settings in the preferences files for Mail, and if there is a corruption in the preference files that is preventing settings changes from working correctly, then this could be why the problems reoccur for some users. The Mail preferences file is called "com.apple.Mail.plist" and is located in the /username/Library/Preferences/ folder. Removing this file will require users to re-enter account information, but Mailbox setup and downloaded messages will all remain intact.
The only problem was that for one of the 2 accounts I did lose all the mail stored locally (I was still able to access through gmail). For the other account I do not appear to have lost anything. My Point: if you fear loss - back up e-mail before doing this.