Notes (Mac) can't connect to IMAP account, Mail can Lately when I try to use the Notes app on Mac OS X 10.8.5, I get a message saying "Notes can't connect to the account JW IMAP", and asking for my password.  If I enter the password, then a minute later the same error comes back.

I'm sure this has to do with the fact that my mail moved to a different server.  But where is Notes getting the old information?  If I choose the Accounts... menu item in Notes, it takes me to the Mail, Contacts, and Calendars pane in System Preferences, which currently has nothing in it.  If I click Add Other Account there, it takes me over to Mail, as if I were going to add a new Mail account.  But Mail is already correctly connecting to the new server, I don't want a new account there!

I tried repairing disk permissions and it didn't help.

I'm tempted to nuke the Notes files in ~/Library/Containers/com.apple.Notes and see if it gets reconstructed.
Notes accounts are usually associated with email accounts like iCloud, gmail, yahoo etc.

if you have an iCloud/iTunes account, log in to it under System Preferences-->Internet Accounts

Click the checkbox next to notes.

Open Notes, then drag your old notes into the iCloud account on the left.