After the Yosemite launch for Mac platforms, a new setting in Apple Mail for automatic maintenance/update of account settings appeared. This setting sometimes overrides current settings, and the email account may not work anymore.
This problem can be solved by running through the settings for incoming and outgoing email, write the correct information and remove the check mark in the check box «Find and maintain account settings automatically».
Use these guides to set the correct email settings in Mail for Mac:
» Configure new email account in Mail for Mac
» Edit existing email account settings in Mail for Mac