Some months ago (exactly since 15/6/2017) all my email clients I configured in my Windows PCs and smartphones started to have problems in accessing only an iCloud email … while the same account continued to work properly only on an Apple device I have (iPad 2).
Useless trying to recreate the email account with the email client (e.g. Microsoft Mail app or Outlook) even configuring that account not only automatically (choosing iCloud as account type) but also manually from the Advanced setup (last choice that becomes visible only scrolling down the list) and setting properly by hand the IMAP4 account (Incoming email server: imap.mail.me.com:993:1 ; Outgoing (SMTP) email server: smtp.mail.me.com:587:1 )!!
Sometime happened that the client couldn’t find the new created account, even though the username and password were correct, some others the account was created successfully BUT, then, no synchronization succeeded!
Searching in some forums I found the reason: on 15/6/2017, Apple introduced new security measures for using 3rd party apps or devices that access an iCloud account, as explained in that Apple support page.
From this post in the Apple forum you can read the following further details: “In order to get those apps or devices signed back in so that they can access iCloud, you need to use an App-specific password to sign them in. The only way to get an App-specific password is to set up either Two-Factor Authentication or Two-Step Verification on your Apple account. If you have an iOS device running iOS 9 or later, or a Mac running Yosemite or later, you can set up Two-Factor Authentication. If you do not have either of those, then you can set up Two-Step Verification. Here is the Two-Factor Verification link, and within that link is a separate link if you need to set up Two-Step Verification: Two-factor authentication for Apple ID – Apple Support. Once you get either 2FA or Two-Step set up for your Apple account, you can then generate an App-specific password that you would then use to sign in with instead of your regular Apple ID password: Using app-specific passwords – Apple Support“.
Therefore, if you want to continue to use a third party email client, you have to set in your Apple account a two-factor authentication or a two-step verification and only after that, you can request for a specific password for each specific third party client!!
… that procedure, I thing, it is really useless in most cases from the security point of view and it was probably introduced mainly to let the user chooses an Apple client instead of a third party one! In fact an Apple client does not necessarily require those security measures … I wonder why!
P.S. From another post you can read another information that can be useful to you, related to the username you have to use accessing to your iCloud email: “You need to authenticate with your Apple ID email address and password (NOT necessarily your iCloud email address and password! Many people’s APPLE IDs are NOT their iCloud email address because when someone got his new Apple device, he probably already had another email address that he wanted to use when Apple had you create an Apple ID. So THAT is what you are going to use because iCloud uses your Apple ID (which is NOT necessarily your iCloud email address) as a centralized way of authenticating“.