Unable to sync icloud mail with Windows 10 mail app with 2 step verification turned on
If your iCloud email is protected with Apple's two step verification, It will need an 'app-specific password' to sign into an app that's not provided by Apple, like Windows Mail which doesn't support entering verification codes.
Sign into Apple ID with your iCloud email and password: https://appleid.apple.com/account/manage
If you're a two step verification user, your device (for me, my iPhone) will give you a verification code to enter after you put in your iCloud email password
In the 'Security' section, hit 'Edit'
In the 'App-Specific Passwords' section, hit 'Generate Password...'
Enter a label for this password (I typed 'Windows 10 mail app')
Hit 'Create'
An app-specific password will be created for you, in this format (case sensitive) tmah-jdbq-rdyy-gdes
Copy the password and hit 'Done'
Now open up Windows Mail > settings (cog icon) > manage accounts > select your iCloud account and enter your app-specific password then 'Save'
Your iCloud email should now start to appear.
Incoming email server: imap.mail.me.com:993:1
Outgoing (SMTP) email server: smtp.mail.me.com:587:1
A word of warning though. If you change your primary Apple ID password, all your app-specific passwords will be automatically revoked and you'll need to generate a new one for any apps you want to keep using.
Hope this helps
Cheers
Rescue PC