There is some difficulty making older MobileMe accounts work with iCloud. When you try to manually set up such an account, there does does not appear to be a way to manually enter iCloud’s IMAP and SMTP settings. But it can be done.
While in Mail’s Accounts setting, click on the Plus button and enter your iCloud address and password as you normally would. The button at the bottom will read Create. Hold down the Option key and that button changes to Continue. Click on Continue. Instead of your account being set up for you, you can now set it up manually.
In the next section (Incoming Mail Server), choose IMAP from the Account Type pop-up menu. Leave iCloud in the description field, or call it anything you would like. In the Incoming Mail Server field enter imap.mail.me.com. Your user name and password should be filled in automatically. If the button at the bottom of the sheet doesn’t read Continue, hold down the Option key and it will. Click the button.
In the next section (Incoming Mail Security) enable the Use Secure Socket Layer (SSL) option and choose Password from the Authentication pop-up menu. Click Continue (again, holding down the Option key if the button reads Create).
In the Outgoing Mail Server section that appears, enter a descriptor (i.e. Outgoing iCloud) in the Description field, enter smtp.mail.me.com in the Outgoing Mail Server field, enable the Use Authentication option, and enter your complete email address in the User Name field and password in the Password field. Click Continue.
In the section Outgoing Mail Security sheet enable the Use Secure Sockets Layer (SSL) option and, from the Authentication pop-up menu, be sure Password is selected. Click Continue again.
The final section will show you the account configuration. Look it over to make sure everything is entered correctly. (If not, use the Go Back button to do exactly that and make corrections needed.) Now click Create to create your account. Your email account should now work as expected.