Since you're posting in the icloud forum, I'm going to assume you're using an icloud email account.
You're not supposed to edit its settings directly. Quit Mail. Click your apple >> system preferences >> icloud. Remove the checkmark beside mail. Wait a minute and recheck it. Then try the account in the mail.app again.
If you've manually added the account because you're not running Lion or Mountain Lion, then you can check the settings in Mail menu >> preferences >> accounts >> select the account. The correct settings for icloud mail is here: http://support.apple.com/kb/HT4864