[May 21 addendum: I’ve corrected this posting to identify the email service as Cox, not Gmail, and to append some additional information on defeating this bug.]
On this one, I suspected poltergeists.
A client called me complaining that she was periodically unable to send mail using her Cox account. We arranged a remote service session, and I found that the port and authentication type parameters for at least one of her outgoing server configurations were incorrect for Cox. I repaired them and verified that the result worked.
The next day, the client wrote to say she was having the same problems. I logged in again, and found that one of the port numbers had changed back to the same incorrect value, and the authentication setting had changed from “password” to “MD5 Challenge-Response.” I asked her if she changed those, and she said no, so I changed them back again and told her there would be no charge for the session.
Two days later, she reported to me that her service has been sporadic. Sometimes she could send mail, and sometime she couldn’t. Sometimes she could send it by switching to the SMTP server on her husband’s account, and sometimes she had to do the reverse.
I got back onto her system, and I found that the configuration values on her account have been changed again, and to values (like port 25) that don’t even work with Cox and never have.
I changed the broken account back to its proper value, whereupon the other one — which had just tested as working — immediately went out of whack!
I switched to it and found that the port had changed again… during the ten seconds that I was working on the other one.
Several times I ping-ponged back and forth, ports and authentication methods mysteriously changing themselves to the wrong values repeatedly during the course of a minute or so.
At this point I began to suspect malware, as improbable as that was. While I was downloading ClamXAV onto her system, I did a fast Web search on the symptoms. I was almost immediately rewarded with a posting describing exactly the same symptoms, and the fix for it.
It seems that in Yosemite, in the advanced section of the e-mail account configuration, there is a new checkbox called, “Automatically detect and maintain account settings.” Yosemite sets this on by default.
The downside is, it’s entirely brain-damaged. It’s just as likely to break your configuration as to maintain it, and is perfectly capable of doing either dozens of times a day, behind your back.
I turned that pesky option off, and again locked the port and password fields to working values. I’m hoping I’ll hear no more of this problem (at least from this client) until Apple finally fixes their buggy code.
[Addendum, May 21: Since posting this, I’ve heard from several other users with exactly the same problem. Informed speculation has it that it is Cox themselves who are feeding these erroneous values back into Mail, and not an Apple bug at all.
[Additionally, Yosemite also added a second “Automatically detect and maintain account settings” checkbox in the “Edit SMTP Server” area itself. If you don’t turn off both this flag and the one in Account / Advanced, the hits will just keep on coming. Make sure they stay off, as at least one user reports the one in Account / Advanced mysteriously turning itself back on right after he turned off the one in “Edit SMTP Server.”]