A number of users have reported an issue in which the Mail app hangs indefinitely when checking for new messages after the update to iOS 4.0. In these cases, the “checking for mail” and the spinning progress indicator display persistently, never advancing to actually receiving mail, or the check for mail button produces no action.
This issue occurs with MobileMe, IMAP, POP and Exchange accounts.
Restart mail. If you are using a device that allows multitasking, double-tap the home button to bring up the list of currently running applications. Hold the Mail icon until it begins to wiggle, then tap the small red circle to close it. Relaunch Mail and check your mail.
Download configuration file. If you are having this problem with an Exchange account, you may need to install a configuration profile from Apple that increases the amount of time the iOS 4 device will wait for the Exchange Server to respond to its sync requests. See this knowledge base document for more information.
Turn airplane mode on then back off. Go to Settings and turn Airplane Mode on then back off.
Reboot. Simply rebooting your iPhone, iPad or iPod touch by holding down the sleep/wake button (on top of the device) for several seconds, until power off slider appears, then powering the unit back on can temporarily resolve this issue.