Mail Connection Doctor still attempting to access deleted Mail accounts I was testing some email servers and added several email accounts to my Mac. I deleted these accounts afterwards.

Now I have only three base accounts in System Preferences &gt; Internet Accounts: Facebook, Twitter and iCloud.



However, Mail Connection Doctor (Window &gt; Connection Doctor) still attempts to access the deleted accounts; if one of them has invalid credentials or settings it reports "Mail can't connect to the account."



Where these accounts are stored and can I permanently remove them so the Mail Connection Doctor doesn't try to connect?
These accounts are stored in Keychain Access application and in servers list. To remove these accounts permanently, do following:


Open (Mail > Preferences > Accounts)
Select "Edit SMTP server list" from "Outgoing Mail Server" menu





Edit server list


Then remove accounts from Keychain Access:


Close Mail
Open Keychain Access
Select "login" in Keychains section
Select "Passwords" in Category section
Type deleted account name in Search field


There should appear several records, but you need only com.apple.account.SMTP.xxx and/or com.apple.account.IMAP.xxx entries with "application password" in Kind column.



Select and delete them. Open Mail and check Connection Doctor. There must remain only existing accounts.