Hi Peroni10.
I had this problem and resolved it by going to Mail preferences and selecting the account you're having issues with. Then select the Outgoing Mail Server drop down menu and click Edit SMTP Server List. Then click the plus sign to add a new outgoing server and fill in the following details:
Description: ICloud Outgoing 2
Server name: smtp.mail.me.com
Click the Advanced Tab and enter the following details:
Toggle SSL encryption to On or Yes.
Set the port to 587.
Set Authentication Required to Password.
Enter your iCloud email address as the username, using @me.com instead of @icloud.com— example: jim@me.com
Enter your iCloud password.
Then click ok
You will now be back in the accounts information tab of Mail Preferences. Again click on the Outgoing Mail Server drop down menu and select your new server ICloud Outgoing 2. Then exit Preferences and save changes.
This should solve the problem.