Navigate to Account Settings > Email Settings.
Incoming Email (Email Account:)
- Server name: imap.mail.me.com
- Port: 993
- SSL required: Yes
- Username: Your full iCloud email address (e.g. email@example.com or firstname.lastname@example.org)If your email client does not allow you to enter the full iCloud email address or you can't connect to iCloud using the full address, try using just the name part of your iCloud email address ("exampleperson" in the above examples).
- Password: an application-specific iCloud Mail password (Starting June 15, 2017, you need to enable an App-Specific Password for your iCloud account)
- Server name: smtp.mail.me.com
- Port: 587 with SSL (or without)
- Port 465 with SSL (or without)
- Port 25 with SSL (or without)