Do you have your MobileMe account setup as POP, or IMAP? If it's IMAP (the default), then it should work. What version of OS X are you running, and at what point do you get the error?
You could also try doing this manually like this:
1. Quit Mail if it's running.
2. Launch Terminal and paste:
defaults write com.apple.finder AppleShowAllFiles -bool true
into the window and press Enter or Return. Then type "killall Finder" and press Enter or Return.
3. Go to ~/Library/Mail/<IMAP_emailaddress@domain.com>, look for the file named ".OfflineCache" and delete it (you may need to give Admin authorization for this).
4. Restart Mail and test again.
5. If it works, then paste:
defaults write com.apple.finder AppleShowAllFiles -bool false
into Terminal; press Enter or Return. Then type "killall Finder" and press Enter or Return again, then quit Terminal.
Mulder