All larger email providers are slowly but steadily moving away from regular password-based authentication for email protocols like IMAP and SMTP. There are multiple options to do so. For example, iCloud requires you to generate application passwords for IMAP. Gmail is pushing OAuth2, even though it also allows application passwords.