'Mail can't connect to the account' keeps appearing So I've configured my mail using a profile. I have setup 3 mail accounts, but each time I launch Mail, it asks me for the passwords of all those accounts. The first time I thought: maybe that's a bug in Mail when mail accounts are configured using profiles. Unfortunately, that doesn't seem to be the case: it prompts me to enter the password for all 3 accounts, and it doesn't stop. When I enter it, it just asks me for the passwords of the other accounts, and then it asks for the first one again, etc., etc.

When I go to the Preferences, I can see that the passwords are indeed not entered. It can only connect to one(!) SMTP server (that's what Connection Doctor says).

What is causing this and how can it be solved?
The quickest way to run through the potential problems is to follow these steps:


Check the keychain to find any entries that match your email accounts, then delete all of them. Reboot.
Try to connect again, entering your passwords again.  Check email again and see if the error reoccurs.
If the error happens again, delete your email accounts using the system preferences, reboot, and then add them back. Check email again. 


If the error continues to occur after doing all that, you might think about taking your Mac into the Apple genius bar.