Tried all of the above and still having same issue.
I'm using a private POP e-mail account through Hostgator. (So it's not a Gmail or IMAP issue)
This email account has worked for years and the issue started yesterday - wondering if it is due to the latest Yosemite update I did yesterday morning?
(I'm on a late 2008 15" MacBook Pro running Yosemite 10.10.4 )
Went to Mail->Preference->Accounts->(Select Account)->Outgoing Mail Server (Drop Down)->Edit SMTP Server List->(Select Account)->Advanced->
Tried changing port settings; didn't work.
Tried variations of user name: username@domain.com; username+domain.com; and/or simply username - none of these worked
Tried going into - applications>utilities>keychain access>passwords - deleted password for mail.[mydomain.com] (to prompt Mac to ask for password so I could re-enter new password) - didn't work.
Took all accounts offline. Put all accounts online again. (That has worked for similar issues in the past - didn't work this time)
The box was already checked for 'Automatically detect and maintain account settings' when the problem started, so I unchecked it to see if this was the issue. That didn't work.
I didn't want to delete my old account because I don't want to lose a lot of important business emails -
so I deactivated the account and set up a new account - it worked for about 12 hours and then the same error message re-appeared:
MCMailErrorDomain error 1045
(To prevent 'interference' I made sure the deactivated account is also set to use the new stmp outgoing server)
Incoming mail is fine, but it won't send outgoing mail.
I changed my domain host about a week ago - but retained the hostgator nameservers so this shouldn't have been affected. It had worked fine for a week until today.
Finally decided to re-check the box - 'Automatically detect and maintain account settings' - and VOILA it has just sent my outgoing mail!
I'm not sure what, if anything in this sequence of events has fixed the issue - or if there is some intermittent glitch at work. (Because it worked yesterday for 12 hours before stopping again)
So just watching how it goes today.
If it happens again I will go straight to Mail->Preference->Accounts->(Select Account)->Outgoing Mail Server (Drop Down)->Edit SMTP Server List->(Select Account)->Advanced-> UNCHECK "Automatically detect and maintain account settings"
then I will quit mail and re-open it
return to Mail->Preference->Accounts->(Select Account)->Outgoing Mail Server (Drop Down)->Edit SMTP Server List->(Select Account)->Advanced-> AND RECHECK "Automatically detect and maintain account settings"
I'd be curious if anyone else tries this to see if it works ... if it happens again I'll try it - and post the results here!