The Password rejection can confuse people since it's a catch all meaning...
This Password, Username, Authentication method... is not recognized on this Port to this Server, or a server end problem.
Or duplicate entries in Keychain Access.
If using a browser to login via WebMail works it's not Name or Password, but one of the other ones.
The receiving email ports are:
IMAP is port 143
IMAP-SSL is port 993
POP is port 110
POP-SSL is port 995
Outgoing ports are...
SMTP and SMTP-SSL is on ports 25, 587 and 465. Port 587 has to be SSL, and port 465 is enforced TLS-wrapped and is generally used by Outlook users.
Is this how you set it up?
Is it a POP or IMAP sccount?
Not certain, but this can fix myriad Mail problems...
Safe Boot from the HD, (holding Shift key down at bootup), it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move this folder & file to the Desktop.
Move this Folder to the Desktop...
Move this file to the Desktop...
Note, in 10.5 & up /Users/YourUserName/Library/Caches/Mail/ may or may not exist.