Launch the Keychain Access application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
Use the search box in the toolbar of the Keychain Access to search for the name of the mail server you're having trouble with. Double-click one of the items and check the box marked Show password in the inspector window. You'll be prompted for your keychain password to confirm. Make a note of the user name and password. Then delete every "Internet Password" item in the search results. Quit Keychain Access.
Quit and relaunch Mail. You'll be prompted for the account user name and password. Enter the information you noted earlier and check the box to save it in the Keychain.