Always post your OSX version, and what is it?
and
Port 143 is incorrect for iCloud Mail, it should be 993:
Here are full directions for an iCloud Mail account.
If your password does not meet these requirements change it:
Minimum of 8 characters, including (at least) 1 uppercase letter, 1 lowercase letter and 1 number, no special characters.
Manual Account Setup
Go to Mail>Preferences>Accounts, click the + sign, enter your .me or .mac address and password then press the option key and click Continue
Verify that you are using the correct server credentials:
IMAP (Incoming Mail Server) information:
- ¥ Server name: imap.mail.me.com
- ¥ SSL Required: Yes
- ¥ Port: 993
- ¥ Username: example@me.com (use your @me.com address from your iCloud account)
- ¥ Password: Your iCloud password
SMTP (outgoing mail server) information:
- ¥ Server name: smtp.mail.me.com
- ¥ SSL Required: Yes
- ¥ Port: 587
- ¥ SMTP Authentication Required: Yes
- ¥ Username: example@me.com (use your @me.com address)
- ¥ Password: Your iCloud password
Note: If you receive errors using SSL, try using TLS instead.
Additional Information
SSL is required for both IMAP and SMTP connection with iCloud. POP is not supported by iCloud.